From 18657a960e125336f704ea058e25c27bd3900dcb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 19:28:19 +0200 Subject: Adding upstream version 3.40.1. Signed-off-by: Daniel Baumann --- www/c3ref/deserialize.html | 167 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 www/c3ref/deserialize.html (limited to 'www/c3ref/deserialize.html') diff --git a/www/c3ref/deserialize.html b/www/c3ref/deserialize.html new file mode 100644 index 0000000..40bef72 --- /dev/null +++ b/www/c3ref/deserialize.html @@ -0,0 +1,167 @@ + + + + + +Deserialize a database + + + +
+ + + +
+
+Small. Fast. Reliable.
Choose any three. +
+ + +
+
+ + + +
+
+
+ + +
+

SQLite C Interface

+

Deserialize a database

+
+
+int sqlite3_deserialize(
+  sqlite3 *db,            /* The database connection */
+  const char *zSchema,    /* Which DB to reopen with the deserialization */
+  unsigned char *pData,   /* The serialized database content */
+  sqlite3_int64 szDb,     /* Number bytes in the deserialization */
+  sqlite3_int64 szBuf,    /* Total size of buffer pData[] */
+  unsigned mFlags         /* Zero or more SQLITE_DESERIALIZE_* flags */
+);
+
+

+The sqlite3_deserialize(D,S,P,N,M,F) interface causes the +database connection D to disconnect from database S and then +reopen S as an in-memory database based on the serialization contained +in P. The serialized database P is N bytes in size. M is the size of +the buffer P, which might be larger than N. If M is larger than N, and +the SQLITE_DESERIALIZE_READONLY bit is not set in F, then SQLite is +permitted to add content to the in-memory database as long as the total +size does not exceed M bytes.

+ +

If the SQLITE_DESERIALIZE_FREEONCLOSE bit is set in F, then SQLite will +invoke sqlite3_free() on the serialization buffer when the database +connection closes. If the SQLITE_DESERIALIZE_RESIZEABLE bit is set, then +SQLite will try to increase the buffer size using sqlite3_realloc64() +if writes on the database cause it to grow larger than M bytes.

+ +

The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the +database is currently in a read transaction or is involved in a backup +operation.

+ +

It is not possible to deserialized into the TEMP database. If the +S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the +function returns SQLITE_ERROR.

+ +

If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the +SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then +sqlite3_free() is invoked on argument P prior to returning.

+ +

This interface is omitted if SQLite is compiled with the +SQLITE_OMIT_DESERIALIZE option. +

See also lists of + Objects, + Constants, and + Functions.

+ -- cgit v1.2.3