xref: /sqlite-3.40.0/ext/misc/README.md (revision 4297584d)
16f25936cSdrh## Miscellaneous Extensions
26f25936cSdrh
36f25936cSdrhThis folder contains a collection of smaller loadable extensions.
46f25936cSdrhSee <https://www.sqlite.org/loadext.html> for instructions on how
56f25936cSdrhto compile and use loadable extensions.
66f25936cSdrhEach extension in this folder is implemented in a single file of C code.
76f25936cSdrh
86f25936cSdrhEach source file contains a description in its header comment.  See the
96f25936cSdrhheader comments for details about each extension.  Additional notes are
106f25936cSdrhas follows:
116f25936cSdrh
126f25936cSdrh  *  **carray.c** &mdash;  This module implements the
136f25936cSdrh     [carray](https://www.sqlite.org/carray.html) table-valued function.
146f25936cSdrh     It is a good example of how to go about implementing a custom
156f25936cSdrh     [table-valued function](https://www.sqlite.org/vtab.html#tabfunc2).
166f25936cSdrh
17*4297584dSdrh  *  **csv.c** &mdash;  A [virtual table](https://sqlite.org/vtab.html)
18*4297584dSdrh     for reading
19*4297584dSdrh     [Comma-Separated-Value (CSV) files](https://en.wikipedia.org/wiki/Comma-separated_values).
20*4297584dSdrh
216f25936cSdrh  *  **dbdump.c** &mdash;  This is not actually a loadable extension, but
226f25936cSdrh     rather a library that implements an approximate equivalent to the
236f25936cSdrh     ".dump" command of the
246f25936cSdrh     [command-line shell](https://www.sqlite.org/cli.html).
256f25936cSdrh
26*4297584dSdrh  *  **json1.c** &mdash;  Various SQL functions and table-valued functions
27*4297584dSdrh     for processing JSON.  This extension is already built into the
28*4297584dSdrh     [SQLite amalgamation](https://sqlite.org/amalgamation.html).  See
29*4297584dSdrh     <https://sqlite.org/json1.html> for additional information.
30*4297584dSdrh
316f25936cSdrh  *  **memvfs.c** &mdash;  This file implements a custom
326f25936cSdrh     [VFS](https://www.sqlite.org/vfs.html) that stores an entire database
336f25936cSdrh     file in a single block of RAM.  It serves as a good example of how
346f25936cSdrh     to implement a simple custom VFS.
356f25936cSdrh
366f25936cSdrh  *  **rot13.c** &mdash;  This file implements the very simple rot13()
376f25936cSdrh     substitution function.  This file makes a good template for implementing
386f25936cSdrh     new custom SQL functions for SQLite.
396f25936cSdrh
406f25936cSdrh  *  **series.c** &mdash;  This is an implementation of the
416f25936cSdrh     "generate_series" [virtual table](https://www.sqlite.org/vtab.html).
426f25936cSdrh     It can make a good template for new custom virtual table implementations.
436f25936cSdrh
446f25936cSdrh  *  **shathree.c** &mdash;  An implementation of the sha3() and
456f25936cSdrh     sha3_query() SQL functions.  The file is named "shathree.c" instead
466f25936cSdrh     of "sha3.c" because the default entry point names in SQLite are based
476f25936cSdrh     on the source filename with digits removed, so if we used the name
486f25936cSdrh     "sha3.c" then the entry point would conflict with the prior "sha1.c"
496f25936cSdrh     extension.
50*4297584dSdrh
51*4297584dSdrh  *  **unionvtab.c** &mdash; Implementation of the unionvtab and
52*4297584dSdrh     [swarmvtab](https://sqlite.org/swarmvtab.html) virtual tables.
53*4297584dSdrh     These virtual tables allow a single
54*4297584dSdrh     large table to be spread out across multiple database files.  In the
55*4297584dSdrh     case of swarmvtab, the individual database files can be attached on
56*4297584dSdrh     demand.
57*4297584dSdrh
58*4297584dSdrh  *  **zipfile.c** &mdash;  A [virtual table](https://sqlite.org/vtab.html)
59*4297584dSdrh     that can read and write a
60*4297584dSdrh     [ZIP archive](https://en.wikipedia.org/wiki/Zip_%28file_format%29).
61