Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Improved comments in the header of the LSM1 vtab module. No code changes. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
aa49926dbffaae4f7c486be72ad814f3 |
User & Date: | drh 2017-08-11 18:55:04.223 |
Context
2017-08-11
| ||
18:59 | Fix compiler warnings that arise if the PAGERTRACE macro is turned on. This changes does not affect production builds. (check-in: 831156a4bd user: drh tags: trunk) | |
18:55 | Improved comments in the header of the LSM1 vtab module. No code changes. (check-in: aa49926dbf user: drh tags: trunk) | |
13:51 | New test cases for LSM1. (check-in: cb0c49cbd1 user: drh tags: trunk) | |
Changes
Changes to ext/lsm1/lsm_vtab.c.
1 2 3 4 5 6 7 8 9 10 11 12 | /* ** 2015-11-16 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** | | > > > | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* ** 2015-11-16 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** ** This file implements a virtual table for SQLite3 around the LSM ** storage engine from SQLite4. ** ** USAGE ** ** CREATE VIRTUAL TABLE demo USING lsm1(filename,key,keytype,value1,...); ** ** The filename parameter is the name of the LSM database file, which is ** separate and distinct from the SQLite3 database file. ** ** The keytype must be one of: UINT, TEXT, BLOB. All keys must be of that ** one type. "UINT" means unsigned integer. The values may be of any ** SQLite datatype: BLOB, TEXT, INTEGER, FLOAT, or NULL. ** ** The virtual table contains read-only hidden columns: ** ** lsm1_key A BLOB which is the raw LSM key. If the "keytype" ** is BLOB or TEXT then this column is exactly the ** same as the key. For the UINT keytype, this column ** will be a variable-length integer encoding of the key. ** ** lsm1_value A BLOB which is the raw LSM value. All of the value ** columns are packed into this BLOB using the encoding ** described below. ** ** Attempts to write values into the lsm1_key and lsm1_value columns are ** silently ignored. ** ** EXAMPLE ** ** The virtual table declared this way: ** ** CREATE VIRTUAL TABLE demo2 USING lsm1('x.lsm',id,UINT,a,b,c,d); ** ** Results in a new virtual table named "demo2" that acts as if it has ** the following schema: ** ** CREATE TABLE demo2( ** id UINT PRIMARY KEY ON CONFLICT REPLACE, ** a ANY, ** b ANY, ** c ANY, ** d ANY, ** lsm1_key BLOB HIDDEN, ** lsm1_value BLOB HIDDEN ** ) WITHOUT ROWID; ** ** ** ** INTERNALS ** ** The key encoding for BLOB and TEXT is just a copy of the blob or text. ** UTF-8 is used for text. The key encoding for UINT is the variable-length ** integer format at https://sqlite.org/src4/doc/trunk/www/varint.wiki. ** |
︙ | ︙ |