Debian Codegraph @

www/vtablist.html

raw
1 <!DOCTYPE html>
2 <html><head>
3 <meta name="viewport" content="width=device-width, initial-scale=1.0">
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
5 <link href="sqlite.css" rel="stylesheet">
6 <title>List Of Virtual Tables</title>
7 <!-- path= -->
8 </head>
9 <body>
10 <div class=nosearch>
11 <a href="index.html">
12 <img class="logo" src="images/sqlite370_banner.gif" alt="SQLite" border="0">
13 </a>
14 <div><!-- IE hack to prevent disappearing logo --></div>
15 <div class="tagline desktoponly">
16 Small. Fast. Reliable.<br>Choose any three.
17 </div>
18 <div class="menu mainmenu">
19 <ul>
20 <li><a href="index.html">Home</a>
21 <li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a>
22 <li class='wideonly'><a href='about.html'>About</a>
23 <li class='desktoponly'><a href="docs.html">Documentation</a>
24 <li class='desktoponly'><a href="download.html">Download</a>
25 <li class='wideonly'><a href='copyright.html'>License</a>
26 <li class='desktoponly'><a href="support.html">Support</a>
27 <li class='desktoponly'><a href="prosupport.html">Purchase</a>
28 <li class='search' id='search_menubutton'>
29 <a href="javascript:void(0)" onclick='toggle_search()'>Search</a>
30 </ul>
31 </div>
32 <div class="menu submenu" id="submenu">
33 <ul>
34 <li><a href='about.html'>About</a>
35 <li><a href='docs.html'>Documentation</a>
36 <li><a href='download.html'>Download</a>
37 <li><a href='support.html'>Support</a>
38 <li><a href='prosupport.html'>Purchase</a>
39 </ul>
40 </div>
41 <div class="searchmenu" id="searchmenu">
42 <form method="GET" action="search">
43 <select name="s" id="searchtype">
44 <option value="d">Search Documentation</option>
45 <option value="c">Search Changelog</option>
46 </select>
47 <input type="text" name="q" id="searchbox" value="">
48 <input type="submit" value="Go">
49 </form>
50 </div>
51 </div>
52 <script>
53 function toggle_div(nm) {
54 var w = document.getElementById(nm);
55 if( w.style.display=="block" ){
56 w.style.display = "none";
57 }else{
58 w.style.display = "block";
59 }
60 }
61 function toggle_search() {
62 var w = document.getElementById("searchmenu");
63 if( w.style.display=="block" ){
64 w.style.display = "none";
65 } else {
66 w.style.display = "block";
67 setTimeout(function(){
68 document.getElementById("searchbox").focus()
69 }, 30);
70 }
71 }
72 function div_off(nm){document.getElementById(nm).style.display="none";}
73 window.onbeforeunload = function(e){div_off("submenu");}
74 /* Disable the Search feature if we are not operating from CGI, since */
75 /* Search is accomplished using CGI and will not work without it. */
76 if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){
77 document.getElementById("search_menubutton").style.display = "none";
78 }
79 /* Used by the Hide/Show button beside syntax diagrams, to toggle the */
80 function hideorshow(btn,obj){
81 var x = document.getElementById(obj);
82 var b = document.getElementById(btn);
83 if( x.style.display!='none' ){
84 x.style.display = 'none';
85 b.innerHTML='show';
86 }else{
87 x.style.display = '';
88 b.innerHTML='hide';
89 }
90 return false;
91 }
92 var antiRobot = 0;
93 function antiRobotGo(){
94 if( antiRobot!=3 ) return;
95 antiRobot = 7;
96 var j = document.getElementById("mtimelink");
97 if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href");
98 }
99 function antiRobotDefense(){
100 document.body.onmousedown=function(){
101 antiRobot |= 2;
102 antiRobotGo();
103 document.body.onmousedown=null;
104 }
105 document.body.onmousemove=function(){
106 antiRobot |= 2;
107 antiRobotGo();
108 document.body.onmousemove=null;
109 }
110 setTimeout(function(){
111 antiRobot |= 1;
112 antiRobotGo();
113 }, 100)
114 antiRobotGo();
115 }
116 antiRobotDefense();
117 </script>
118 <div class=fancy>
119 <div class=nosearch>
120 <div class="fancy_title">
121 List Of Virtual Tables
122 </div>
123 <div class="fancy_toc">
124 <a onclick="toggle_toc()">
125 <span class="fancy_toc_mark" id="toc_mk">&#x25ba;</span>
126 Table Of Contents
127 </a>
128 <div id="toc_sub"><div class="fancy-toc1"><a href="#introduction">1. Introduction</a></div>
129 <div class="fancy-toc1"><a href="#virtual_tables">2. Virtual Tables</a></div>
130 </div>
131 </div>
132 <script>
133 function toggle_toc(){
134 var sub = document.getElementById("toc_sub")
135 var mk = document.getElementById("toc_mk")
136 if( sub.style.display!="block" ){
137 sub.style.display = "block";
138 mk.innerHTML = "&#x25bc;";
139 } else {
140 sub.style.display = "none";
141 mk.innerHTML = "&#x25ba;";
142 }
143 }
144 </script>
145 </div>
146
147
148
149
150
151
152 <h1 id="introduction"><span>1. </span>Introduction</h1>
153
154 <p>A <a href="vtab.html">virtual table</a> is an object that presents an SQL table
155 interface but which is not stored in the database file, at least
156 not directly. The virtual table mechanism is a feature
157 of SQLite that allows SQLite to access and manipulate resources
158 other than bits in the database file using the powerful SQL
159 query language.
160
161 </p><p>
162 The table below lists a few of the virtual tables implementations
163 available for SQLite. Developers can deploy these virtual tables
164 in their own applications, or use the implementations shown below
165 as templates for writing their own virtual tables.
166
167 </p><p>
168 The list below is not exhaustive.
169 Other virtual table implementation exist in the SQLite source tree
170 and elsewhere.
171 The list below tries to capture the more interesting virtual table
172 implementations.
173
174
175
176 </p><h1 id="virtual_tables"><span>2. </span>Virtual Tables</h1>
177
178 <table striped="1" style="margin:1em auto; width:80%; border-spacing:0">
179 <tr style="text-align:left"><th>Name</th><th>Description</th></tr>
180 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="https://sqlite.org/src/file/ext/misc/amatch.c">approximate_match</a></b></td>
181 <td>A demonstration of how to use a virtual table to implement
182 approximate string matching.</td></tr>
183 <tr style="text-align:left;"><td><b><a href="bytecodevtab.html">bytecode</a></b></td>
184 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> that shows the bytecodes of a prepared
185 statement.</td></tr>
186 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="carray.html">carray</a></b></td>
187 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> that allows a C-language array of integers,
188 doubles, or strings to be used as table in a query.</td></tr>
189 <tr style="text-align:left;"><td><b><a href="https://sqlite.org/src/file/ext/misc/closure.c">closure</a></b></td>
190 <td>Compute the transitive closure of a set.</td></tr>
191 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="completion.html">completion</a></b></td>
192 <td>Suggests completions for partially-entered words during interactive
193 SQL input. Used by the <a href="cli.html">CLI</a> to help implement tab-completion.</td></tr>
194 <tr style="text-align:left;"><td><b><a href="csv.html">csv</a></b></td>
195 <td>A virtual table that represents a comma-separated-value or CSV file
196 (<a href="https://www.ietf.org/rfc/rfc4180.txt">RFC 4180</a>) as a read-only
197 table so that it can be used as part of a larger query.</td></tr>
198 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="dbstat.html">dbstat</a></b></td>
199 <td>Provides information about the purpose and use of each page in a
200 database file. Used in the implementation of the
201 <a href="sqlanalyze.html">sqlite3_analyzer</a> utility program.</td></tr>
202 <tr style="text-align:left;"><td><b><a href="https://fossil-scm.org/fossil/file/src/foci.c">files_of_checkin</a></b></td>
203 <td>Provides information about all files in a single check-in in the
204 <a href="https://fossil-scm.org/">Fossil version control system</a>. This
205 virtual table is not part of the SQLite project but is included because
206 it provides an example of how to use virtual tables and because it is
207 used to help version control the SQLite sources.</td></tr>
208 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="https://sqlite.org/src/file/ext/misc/fileio.c">fsdir</a></b></td>
209 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> returning one row for each file in a
210 selected file hierarchy of the host computer. Used by the
211 <a href="cli.html">CLI</a> to help implement the <a href="cli.html#sqlar">.archive command</a>.</td></tr>
212 <tr style="text-align:left;"><td><b><a href="fts3.html">FTS3</a></b></td>
213 <td>A high-performance full-text search index.</td></tr>
214 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="fts5.html">FTS5</a></b></td>
215 <td>A higher-performance full-text search index</td></tr>
216 <tr style="text-align:left;"><td><b><a href="series.html">generate_series</a></b></td>
217 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> returning a sequence of
218 integers, modeled after the table-valued function by the same
219 name in PostgreSQL.</td></tr>
220 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="json1.html#jeach">json_each</a></b></td>
221 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> for decomposing a JSON string.</td></tr>
222 <tr style="text-align:left;"><td><b><a href="json1.html#jtree">json_tree</a></b></td>
223 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> for decomposing a JSON string.</td></tr>
224 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="https://osquery.readthedocs.io/en/stable/">OsQuery</a></b></td>
225 <td>Hundreds of virtual tables that publish various aspects of the
226 host computer, such as the process table, user lists, active network
227 connections, and so forth.
228 OsQuery is a separate project, started by Facebook, hosted on
229 <a href="https://github.com/facebook/osquery">GitHub</a>, and intended for
230 security analysis and intrusion detection
231 OsQuery is not a part of the SQLite project, but is included in this
232 list because it demonstrates how the SQL language and the
233 SQLite virtual table mechanism
234 can be leveraged to provide elegant solutions
235 to important real-world problems.</td></tr>
236 <tr style="text-align:left;"><td><b><a href="pragma.html#pragfunc">pragma</a></b></td>
237 <td>Built-in <a href="vtab.html#tabfunc2">table-valued functions</a> that return the results of <a href="pragma.html#syntax">PRAGMA</a>
238 statements for use within ordinary SQL queries.</td></tr>
239 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="rtree.html">RTree</a></b></td>
240 <td>An implementation of the Guttmann R*Tree spatial index idea.</td></tr>
241 <tr style="text-align:left;"><td><b><a href="spellfix1.html">spellfix1</a></b></td>
242 <td>A virtual table that implements a spelling correction engine.</td></tr>
243 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="https://sqlite.org/src/file/ext/misc/btreeinfo.c">sqlite_btreeinfo</a></b></td>
244 <td>This experimental <a href="vtab.html#tabfunc2">table-valued function</a> provides information about
245 a single <a href="fileformat2.html#btree">B-tree</a> in a database file, such as the depth, and estimated
246 number of pages and number of entries, and so forth.</td></tr>
247 <tr style="text-align:left;"><td><b><a href="dbpage.html">sqlite_dbpage</a></b></td>
248 <td>Key/value store for the raw database file content. The key is the
249 page number and the value is binary page content.</td></tr>
250 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="memstat.html">sqlite_memstat</a></b></td>
251 <td>Provides SQL access to the <a href="c3ref/status.html">sqlite3_status64()</a> and
252 <a href="c3ref/db_status.html">sqlite3_db_status()</a> interfaces.</td></tr>
253 <tr style="text-align:left;"><td><b><a href="stmt.html">sqlite_stmt</a></b></td>
254 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> containing one row for each
255 <a href="c3ref/stmt.html">prepared statement</a> associated with an open <a href="c3ref/sqlite3.html">database connection</a>.</td></tr>
256 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="swarmvtab.html#overview">swarmvtab</a></b></td>
257 <td>An experimental module providing on-demand read-only access to
258 multiple tables spread across multiple databases, via a single
259 virtual table abstraction.</td></tr>
260 <tr style="text-align:left;"><td><b><a href="bytecodevtab.html">tables_used</a></b></td>
261 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> that shows the tables and indexes that
262 are accessed by a prepared statement.</td></tr>
263 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="https://sqlite.org/src/file/src/test_tclvar.c">tclvar</a></b></td>
264 <td>Represents the global variables of a
265 <a href="https://en.wikipedia.org/wiki/Tcl">TCL Interpreter</a> as an SQL
266 table. Used as part of the SQLite test suite.</td></tr>
267 <tr style="text-align:left;"><td><b><a href="https://sqlite.org/src/file/ext/misc/templatevtab.c">templatevtab</a></b></td>
268 <td>A template virtual table implementation useful as a starting point
269 for developers who want to write their own virtual tables</td></tr>
270 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="unionvtab.html">unionvtab</a></b></td>
271 <td>An experimental module providing on-demand read-only access to
272 multiple tables spread across multiple databases, via a single
273 virtual table abstraction.</td></tr>
274 <tr style="text-align:left;"><td><b><a href="https://sqlite.org/src/file/ext/misc/vfsstat.c">vfsstat</a></b></td>
275 <td>A <a href="vtab.html#tabfunc2">table-valued function</a> which, in combination with a
276 co-packaged <a href="vfs.html#shim">VFS shim</a> provides information on the number of
277 system calls performed by SQLite.</td></tr>
278 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="https://sqlite.org/src/file/ext/misc/vtablog.c">vtablog</a></b></td>
279 <td>A virtual table that prints diagnostic information
280 on stdout when its key methods are invoked. Intended for
281 interactive analysis and debugging of virtual table interfaces.</td></tr>
282 <tr style="text-align:left;"><td><b><a href="https://sqlite.org/src/file/ext/misc/wholenumber.c">wholenumber</a></b></td>
283 <td>A virtual table returns all integers between 1 and 4294967295.</td></tr>
284 <tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="zipfile.html">zipfile</a></b></td>
285 <td>Represent a
286 <a href="https://en.wikipedia.org/wiki/Zip_(file_format)">ZIP Archive</a>
287 as an SQL table. Works for both reading and writing. Used by
288 the <a href="cli.html">CLI</a> to implement the ability to read and write ZIP Archives.</td></tr>
289
290 </table>
291 <p align="center"><small><i>This page last modified on <a href="https://sqlite.org/docsrc/honeypot" id="mtimelink" data-href="https://sqlite.org/docsrc/finfo/pages/vtablist.in?m=4d1872fdb2">2023-05-01 21:49:55</a> UTC </small></i></p>
292