summaryrefslogtreecommitdiffstats
path: root/www/vtablist.html
blob: bb7eceaedd5da2d7530fdb201518e4d88322ce27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<!DOCTYPE html>
<html><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="sqlite.css" rel="stylesheet">
<title>List Of Virtual Tables</title>
<!-- path= -->
</head>
<body>
<div class=nosearch>
<a href="index.html">
<img class="logo" src="images/sqlite370_banner.gif" alt="SQLite" border="0">
</a>
<div><!-- IE hack to prevent disappearing logo --></div>
<div class="tagline desktoponly">
Small. Fast. Reliable.<br>Choose any three.
</div>
<div class="menu mainmenu">
<ul>
<li><a href="index.html">Home</a>
<li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a>
<li class='wideonly'><a href='about.html'>About</a>
<li class='desktoponly'><a href="docs.html">Documentation</a>
<li class='desktoponly'><a href="download.html">Download</a>
<li class='wideonly'><a href='copyright.html'>License</a>
<li class='desktoponly'><a href="support.html">Support</a>
<li class='desktoponly'><a href="prosupport.html">Purchase</a>
<li class='search' id='search_menubutton'>
<a href="javascript:void(0)" onclick='toggle_search()'>Search</a>
</ul>
</div>
<div class="menu submenu" id="submenu">
<ul>
<li><a href='about.html'>About</a>
<li><a href='docs.html'>Documentation</a>
<li><a href='download.html'>Download</a>
<li><a href='support.html'>Support</a>
<li><a href='prosupport.html'>Purchase</a>
</ul>
</div>
<div class="searchmenu" id="searchmenu">
<form method="GET" action="search">
<select name="s" id="searchtype">
<option value="d">Search Documentation</option>
<option value="c">Search Changelog</option>
</select>
<input type="text" name="q" id="searchbox" value="">
<input type="submit" value="Go">
</form>
</div>
</div>
<script>
function toggle_div(nm) {
var w = document.getElementById(nm);
if( w.style.display=="block" ){
w.style.display = "none";
}else{
w.style.display = "block";
}
}
function toggle_search() {
var w = document.getElementById("searchmenu");
if( w.style.display=="block" ){
w.style.display = "none";
} else {
w.style.display = "block";
setTimeout(function(){
document.getElementById("searchbox").focus()
}, 30);
}
}
function div_off(nm){document.getElementById(nm).style.display="none";}
window.onbeforeunload = function(e){div_off("submenu");}
/* Disable the Search feature if we are not operating from CGI, since */
/* Search is accomplished using CGI and will not work without it. */
if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){
document.getElementById("search_menubutton").style.display = "none";
}
/* Used by the Hide/Show button beside syntax diagrams, to toggle the */
function hideorshow(btn,obj){
var x = document.getElementById(obj);
var b = document.getElementById(btn);
if( x.style.display!='none' ){
x.style.display = 'none';
b.innerHTML='show';
}else{
x.style.display = '';
b.innerHTML='hide';
}
return false;
}
var antiRobot = 0;
function antiRobotGo(){
if( antiRobot!=3 ) return;
antiRobot = 7;
var j = document.getElementById("mtimelink");
if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href");
}
function antiRobotDefense(){
document.body.onmousedown=function(){
antiRobot |= 2;
antiRobotGo();
document.body.onmousedown=null;
}
document.body.onmousemove=function(){
antiRobot |= 2;
antiRobotGo();
document.body.onmousemove=null;
}
setTimeout(function(){
antiRobot |= 1;
antiRobotGo();
}, 100)
antiRobotGo();
}
antiRobotDefense();
</script>
<div class=fancy>
<div class=nosearch>
<div class="fancy_title">
List Of Virtual Tables
</div>
<div class="fancy_toc">
<a onclick="toggle_toc()">
<span class="fancy_toc_mark" id="toc_mk">&#x25ba;</span>
Table Of Contents
</a>
<div id="toc_sub"><div class="fancy-toc1"><a href="#introduction">1. Introduction</a></div>
<div class="fancy-toc1"><a href="#virtual_tables">2. Virtual Tables</a></div>
</div>
</div>
<script>
function toggle_toc(){
var sub = document.getElementById("toc_sub")
var mk = document.getElementById("toc_mk")
if( sub.style.display!="block" ){
sub.style.display = "block";
mk.innerHTML = "&#x25bc;";
} else {
sub.style.display = "none";
mk.innerHTML = "&#x25ba;";
}
}
</script>
</div>






<h1 id="introduction"><span>1. </span>Introduction</h1>

<p>A <a href="vtab.html">virtual table</a> is an object that presents an SQL table
interface but which is not stored in the database file, at least
not directly.  The virtual table mechanism is a feature
of SQLite that allows SQLite to access and manipulate resources
other than bits in the database file using the powerful SQL
query language.

</p><p>
The table below lists a few of the virtual tables implementations
available for SQLite.  Developers can deploy these virtual tables
in their own applications, or use the implementations shown below
as templates for writing their own virtual tables.

</p><p>
The list below is not exhaustive.
Other virtual table implementation exist in the SQLite source tree
and elsewhere.
The list below tries to capture the more interesting virtual table
implementations.



</p><h1 id="virtual_tables"><span>2. </span>Virtual Tables</h1>

<table striped="1" style="margin:1em auto; width:80%; border-spacing:0">
<tr style="text-align:left"><th>Name</th><th>Description</th></tr>
<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>
<td>A demonstration of how to use a virtual table to implement
    approximate string matching.</td></tr>
<tr style="text-align:left;"><td><b><a href="bytecodevtab.html">bytecode</a></b></td>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> that shows the bytecodes of a prepared
    statement.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="carray.html">carray</a></b></td>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> that allows a C-language array of integers,
    doubles, or strings to be used as table in a query.</td></tr>
<tr style="text-align:left;"><td><b><a href="https://sqlite.org/src/file/ext/misc/closure.c">closure</a></b></td>
<td>Compute the transitive closure of a set.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="completion.html">completion</a></b></td>
<td>Suggests completions for partially-entered words during interactive
    SQL input.  Used by the <a href="cli.html">CLI</a> to help implement tab-completion.</td></tr>
<tr style="text-align:left;"><td><b><a href="csv.html">csv</a></b></td>
<td>A virtual table that represents a comma-separated-value or CSV file
    (<a href="https://www.ietf.org/rfc/rfc4180.txt">RFC 4180</a>) as a read-only
    table so that it can be used as part of a larger query.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="dbstat.html">dbstat</a></b></td>
<td>Provides information about the purpose and use of each page in a
    database file.  Used in the implementation of the
    <a href="sqlanalyze.html">sqlite3_analyzer</a> utility program.</td></tr>
<tr style="text-align:left;"><td><b><a href="https://fossil-scm.org/fossil/file/src/foci.c">files_of_checkin</a></b></td>
<td>Provides information about all files in a single check-in in the
    <a href="https://fossil-scm.org/">Fossil version control system</a>.  This
    virtual table is not part of the SQLite project but is included because
    it provides an example of how to use virtual tables and because it is
    used to help version control the SQLite sources.</td></tr>
<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>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> returning one row for each file in a
    selected file hierarchy of the host computer.  Used by the
    <a href="cli.html">CLI</a> to help implement the <a href="cli.html#sqlar">.archive command</a>.</td></tr>
<tr style="text-align:left;"><td><b><a href="fts3.html">FTS3</a></b></td>
<td>A high-performance full-text search index.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="fts5.html">FTS5</a></b></td>
<td>A higher-performance full-text search index</td></tr>
<tr style="text-align:left;"><td><b><a href="series.html">generate_series</a></b></td>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> returning a sequence of
    integers, modeled after the table-valued function by the same
    name in PostgreSQL.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="json1.html#jeach">json_each</a></b></td>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> for decomposing a JSON string.</td></tr>
<tr style="text-align:left;"><td><b><a href="json1.html#jtree">json_tree</a></b></td>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> for decomposing a JSON string.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="https://osquery.readthedocs.io/en/stable/">OsQuery</a></b></td>
<td>Hundreds of virtual tables that publish various aspects of the
    host computer, such as the process table, user lists, active network
    connections, and so forth.
    OsQuery is a separate project, started by Facebook, hosted on
    <a href="https://github.com/facebook/osquery">GitHub</a>, and intended for
    security analysis and intrusion detection
    OsQuery is not a part of the SQLite project, but is included in this
    list because it demonstrates how the SQL language and the
    SQLite virtual table mechanism
    can be leveraged to provide elegant solutions
    to important real-world problems.</td></tr>
<tr style="text-align:left;"><td><b><a href="pragma.html#pragfunc">pragma</a></b></td>
<td>Built-in <a href="vtab.html#tabfunc2">table-valued functions</a> that return the results of <a href="pragma.html#syntax">PRAGMA</a>
    statements for use within ordinary SQL queries.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="rtree.html">RTree</a></b></td>
<td>An implementation of the Guttmann R*Tree spatial index idea.</td></tr>
<tr style="text-align:left;"><td><b><a href="spellfix1.html">spellfix1</a></b></td>
<td>A virtual table that implements a spelling correction engine.</td></tr>
<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>
<td>This experimental <a href="vtab.html#tabfunc2">table-valued function</a> provides information about
    a single <a href="fileformat2.html#btree">B-tree</a> in a database file, such as the depth, and estimated
    number of pages and number of entries, and so forth.</td></tr>
<tr style="text-align:left;"><td><b><a href="dbpage.html">sqlite_dbpage</a></b></td>
<td>Key/value store for the raw database file content.  The key is the
    page number and the value is binary page content.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="memstat.html">sqlite_memstat</a></b></td>
<td>Provides SQL access to the <a href="c3ref/status.html">sqlite3_status64()</a> and
    <a href="c3ref/db_status.html">sqlite3_db_status()</a> interfaces.</td></tr>
<tr style="text-align:left;"><td><b><a href="stmt.html">sqlite_stmt</a></b></td>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> containing one row for each
    <a href="c3ref/stmt.html">prepared statement</a> associated with an open <a href="c3ref/sqlite3.html">database connection</a>.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="swarmvtab.html#overview">swarmvtab</a></b></td>
<td>An experimental module providing on-demand read-only access to
    multiple tables spread across multiple databases, via a single
    virtual table abstraction.</td></tr>
<tr style="text-align:left;"><td><b><a href="bytecodevtab.html">tables_used</a></b></td>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> that shows the tables and indexes that
    are accessed by a prepared statement.</td></tr>
<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>
<td>Represents the global variables of a 
    <a href="https://en.wikipedia.org/wiki/Tcl">TCL Interpreter</a> as an SQL
    table. Used as part of the SQLite test suite.</td></tr>
<tr style="text-align:left;"><td><b><a href="https://sqlite.org/src/file/ext/misc/templatevtab.c">templatevtab</a></b></td>
<td>A template virtual table implementation useful as a starting point
    for developers who want to write their own virtual tables</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="unionvtab.html">unionvtab</a></b></td>
<td>An experimental module providing on-demand read-only access to
    multiple tables spread across multiple databases, via a single
    virtual table abstraction.</td></tr>
<tr style="text-align:left;"><td><b><a href="https://sqlite.org/src/file/ext/misc/vfsstat.c">vfsstat</a></b></td>
<td>A <a href="vtab.html#tabfunc2">table-valued function</a> which, in combination with a
    co-packaged <a href="vfs.html#shim">VFS shim</a> provides information on the number of
    system calls performed by SQLite.</td></tr>
<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>
<td>A virtual table that prints diagnostic information
    on stdout when its key methods are invoked.  Intended for
    interactive analysis and debugging of virtual table interfaces.</td></tr>
<tr style="text-align:left;"><td><b><a href="https://sqlite.org/src/file/ext/misc/wholenumber.c">wholenumber</a></b></td>
<td>A virtual table returns all integers between 1 and 4294967295.</td></tr>
<tr style="text-align:left;background-color:#DDDDDD;"><td><b><a href="zipfile.html">zipfile</a></b></td>
<td>Represent a
    <a href="https://en.wikipedia.org/wiki/Zip_(file_format)">ZIP Archive</a>
    as an SQL table.  Works for both reading and writing.  Used by
    the <a href="cli.html">CLI</a> to implement the ability to read and write ZIP Archives.</td></tr>

</table>
<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>