Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix header comments and remove an unnecessary version restriction from the carray() table-valued function implementation. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
021d0fb8d85e44839d2b4fdb90b15f0e |
User & Date: | drh 2016-07-13 00:55:28.831 |
Context
2016-07-13
| ||
13:05 | Fix harmless compiler warnings in shell.c for NetBSD. (check-in: 824b39e54f user: drh tags: trunk) | |
00:55 | Fix header comments and remove an unnecessary version restriction from the carray() table-valued function implementation. (check-in: 021d0fb8d8 user: drh tags: trunk) | |
2016-07-12
| ||
19:54 | Fix the error counter reset in Lemon generated parsers. This has no effect on SQLite. (check-in: 3ef93950d3 user: drh tags: trunk) | |
Changes
Changes to ext/misc/carray.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 | ** ************************************************************************* ** ** This file demonstrates how to create a table-valued-function that ** returns the values in a C-language array. ** Examples: ** | | | | 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 | ** ************************************************************************* ** ** This file demonstrates how to create a table-valued-function that ** returns the values in a C-language array. ** Examples: ** ** SELECT * FROM carray($ptr,5) ** ** The query above returns 5 integers contained in a C-language array ** at the address $ptr. $ptr is a pointer to the array of integers that ** has been cast to an integer. ** ** There is an optional third parameter to determine the datatype of ** the C-language array. Allowed values of the third parameter are ** 'int32', 'int64', 'double', 'char*'. Example: ** ** SELECT * FROM carray($ptr,10,'char*'); ** ** HOW IT WORKS ** ** The carray "function" is really a virtual table with the ** following schema: ** ** CREATE TABLE carray( |
︙ | ︙ | |||
354 355 356 357 358 359 360 | sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi ){ int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); #ifndef SQLITE_OMIT_VIRTUALTABLE | < < < < < | 354 355 356 357 358 359 360 361 362 363 364 | sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi ){ int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); #ifndef SQLITE_OMIT_VIRTUALTABLE rc = sqlite3_create_module(db, "carray", &carrayModule, 0); #endif return rc; } |