Documentation Source Text

Check-in [2ee890a53a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix missing "const" in the documentation of the argv parameters to the xCreate and xConnect methods in the sqlite3_module object.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | branch-3.24
Files: files | file ages | folders
SHA3-256: 2ee890a53a686b0848b9b233e27eca33d42423f968ad074acf4a3fdca47af778
User & Date: drh 2018-06-15 19:12:24.329
Context
2018-06-26
18:24
Mention that UPSERT does not work for virtual tables. (check-in: 887762cf99 user: drh tags: branch-3.24)
2018-06-15
19:12
Fix missing "const" in the documentation of the argv parameters to the xCreate and xConnect methods in the sqlite3_module object. (check-in: 2ee890a53a user: drh tags: branch-3.24)
2018-06-09
22:13
Fix typos in the compile.html page. (check-in: 10c05df9fb user: drh tags: branch-3.24)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/vtab.in.
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
destructor for client data pointer.  The module structure is what defines
the behavior of a virtual table.  The module structure looks like this:

<codeblock>  
  struct sqlite3_module {
    int iVersion;
    int (*xCreate)(sqlite3*, void *pAux,
                 int argc, char **argv,
                 sqlite3_vtab **ppVTab,
                 char **pzErr);
    int (*xConnect)(sqlite3*, void *pAux,
                 int argc, char **argv,
                 sqlite3_vtab **ppVTab,
                 char **pzErr);
    int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
    int (*xDisconnect)(sqlite3_vtab *pVTab);
    int (*xDestroy)(sqlite3_vtab *pVTab);
    int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
    int (*xClose)(sqlite3_vtab_cursor*);







|



|







261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
destructor for client data pointer.  The module structure is what defines
the behavior of a virtual table.  The module structure looks like this:

<codeblock>  
  struct sqlite3_module {
    int iVersion;
    int (*xCreate)(sqlite3*, void *pAux,
                 int argc, char *const*argv,
                 sqlite3_vtab **ppVTab,
                 char **pzErr);
    int (*xConnect)(sqlite3*, void *pAux,
                 int argc, char *const*argv,
                 sqlite3_vtab **ppVTab,
                 char **pzErr);
    int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
    int (*xDisconnect)(sqlite3_vtab *pVTab);
    int (*xDestroy)(sqlite3_vtab *pVTab);
    int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
    int (*xClose)(sqlite3_vtab_cursor*);
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<h1>Virtual Table Methods</h1>

<tcl>hd_fragment xcreate {sqlite3_module.xCreate} {xCreate}</tcl>
<h2>The xCreate Method</h2>

<codeblock>
  int (*xCreate)(sqlite3 *db, void *pAux,
               int argc, char **argv,
               sqlite3_vtab **ppVTab,
               char **pzErr);
</codeblock>

<p>The xCreate method is called to create a new instance of a virtual table 
in response to a [CREATE VIRTUAL TABLE] statement.
If the xCreate method is the same pointer as the [xConnect] method, then the







|







350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<h1>Virtual Table Methods</h1>

<tcl>hd_fragment xcreate {sqlite3_module.xCreate} {xCreate}</tcl>
<h2>The xCreate Method</h2>

<codeblock>
  int (*xCreate)(sqlite3 *db, void *pAux,
               int argc, char *const*argv,
               sqlite3_vtab **ppVTab,
               char **pzErr);
</codeblock>

<p>The xCreate method is called to create a new instance of a virtual table 
in response to a [CREATE VIRTUAL TABLE] statement.
If the xCreate method is the same pointer as the [xConnect] method, then the
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563

<tcl>############################################################# xConnect
hd_fragment xconnect {sqlite3_module.xConnect} {xConnect}</tcl>
<h2>The xConnect Method</h2>

<codeblock>
  int (*xConnect)(sqlite3*, void *pAux,
               int argc, char **argv,
               sqlite3_vtab **ppVTab,
               char **pzErr);
</codeblock>

<p>The xConnect method is very similar to [xCreate]. 
It has the same parameters and constructs a new [sqlite3_vtab] structure 
just like xCreate. 







|







549
550
551
552
553
554
555
556
557
558
559
560
561
562
563

<tcl>############################################################# xConnect
hd_fragment xconnect {sqlite3_module.xConnect} {xConnect}</tcl>
<h2>The xConnect Method</h2>

<codeblock>
  int (*xConnect)(sqlite3*, void *pAux,
               int argc, char *const*argv,
               sqlite3_vtab **ppVTab,
               char **pzErr);
</codeblock>

<p>The xConnect method is very similar to [xCreate]. 
It has the same parameters and constructs a new [sqlite3_vtab] structure 
just like xCreate.