/ Check-in [a13b2b38]
Login

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

Overview
Comment:Update README.md in ext/zonefile.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | zonefile
Files: files | file ages | folders
SHA3-256: a13b2b38137025d04bbfc1b12f0d0563dcf7e0ab1d4b06ffc7cacf994f00e188
User & Date: dan 2018-02-20 20:57:20
Context
2018-02-21
10:43
In zonefile, change the "file TEXT" column back to "fileid INTEGER". The fileid can be used as a key with the associated zonefile_files table, which contains more information than just the filename. check-in: 38d23888 user: dan tags: zonefile
2018-02-20
20:57
Update README.md in ext/zonefile. check-in: a13b2b38 user: dan tags: zonefile
19:25
Fix a problem with reading the "file" column of a zonefile virtual table. check-in: d8d0bdcb user: dan tags: zonefile
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/zonefile/README.md.

26
27
28
29
30
31
32
33
34




35
36
























37
38
39
40
41
42
43
..
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
>     SELECT zonefile_write(<file>, <table> [, <parameters>]);

where &lt;file&gt; is the name of the file to create on disk, &lt;table&gt; 
is the name of the database table to read and optional argument 
&lt;parameters&gt; is a JSON object containing various attributes that
influence creation of the zonefile file. 

Currently the only &lt;parameters&gt; attribute supported is 
<i>maxAutoFrameSize</i> (default value 65536), which sets the maximum 




uncompressed frame size in bytes for automatically generated zonefile 
frames.

























For example, to create a zonefile named "test.zonefile" based on the
contents of database table "test_input" and with a maximum automatic
frame size of 4096 bytes:

>     SELECT zonefile_write('test.zonefile', 'test_input',
>       '{"maxAutoFrameSize":4096}'
................................................................................

>     CREATE VIRTUAL TABLE z1 USING zonefile;

This creates two virtual tables in the database schema. One read-only table
named "z1", with a schema equivalent to:

>     CREATE TABLE z1(  -- this whole table is read-only
>       k INTEGER PRIMARY KEY,
>       v BLOB,
>       fileid INTEGER,
>       frame INTEGER,
>       ofst INTEGER,
>       sz INTEGER
>     );

And a read-write table named "z1_files" with a schema like:

>     CREATE TABLE z1_files(
>       filename TEXT PRIMARY KEY,
>       ekey BLOB,         -- encryption key







|
<
>
>
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
|
|
<
<
|







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
..
76
77
78
79
80
81
82
83
84
85


86
87
88
89
90
91
92
93
>     SELECT zonefile_write(<file>, <table> [, <parameters>]);

where &lt;file&gt; is the name of the file to create on disk, &lt;table&gt; 
is the name of the database table to read and optional argument 
&lt;parameters&gt; is a JSON object containing various attributes that
influence creation of the zonefile file. 

Currently, the following &lt;parameters&gt; attributes are supported:


<table border=1>
<tr align=left><th>Attribute<th>Default<th>Interpretation
<tr valign=top><td>maxAutoFrameSize<td>65536
<td>The maximum uncompressed frame size in bytes for automatically generated
zonefile frames.

<tr valign=top><td>compressionTypeContent<td>"none"
<td>The compression type used to compress each frame in the zonefile. 
Valid values are "none" (no compression), "zstd", "zstd_global_dict",
"zlib", "brotli", "lz4" and "lz4hc". Not all compression methods are
supported by all builds. The compression method supported by a build
depends on the combination of SQLITE_HAVE_ZSTD, SQLITE_HAVE_ZLIB,
SQLITE_HAVE_BROTLI and SQLITE_HAVE_LZ4 pre-processor symbols defined
at build time.

<tr valign=top><td>compressionTypeIndexData<td>"none"
<td>The compression type used to compress the zonefile index structure.
All values that are valid for the <i>compressionTypeContent</i> parameter,
except for "zstd_global_dict", are also valid for this option.

<tr valign=top><td>encryptionType<td>"none"
<td>The encryption type to use. At present the only valid values are
"none" (no encryption) and "xor" (an insecure mock encryption method
useful for testing only).

<tr valign=top><td>encryptionKey<td>""
<td>The encryption key (a string) to use. The value of this option is
ignored if <i>encryptionType</i> is set to "none".
</table>

For example, to create a zonefile named "test.zonefile" based on the
contents of database table "test_input" and with a maximum automatic
frame size of 4096 bytes:

>     SELECT zonefile_write('test.zonefile', 'test_input',
>       '{"maxAutoFrameSize":4096}'
................................................................................

>     CREATE VIRTUAL TABLE z1 USING zonefile;

This creates two virtual tables in the database schema. One read-only table
named "z1", with a schema equivalent to:

>     CREATE TABLE z1(  -- this whole table is read-only
>       k INTEGER PRIMARY KEY,     -- key value
>       v BLOB,                    -- associated blob of data
>       file TEXT,                 -- file this key is read from 


>       sz INTEGER                 -- size of blob of data in bytes
>     );

And a read-write table named "z1_files" with a schema like:

>     CREATE TABLE z1_files(
>       filename TEXT PRIMARY KEY,
>       ekey BLOB,         -- encryption key