From 0f9cfacd6cc45f78f1453a8eeb7ffa542dc5dc48 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Jul 2015 18:43:03 +0200 Subject: Implement SQLite incremental BLOB/TEXT I/O --- odb/sqlite/sqlite-types.hxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'odb/sqlite/sqlite-types.hxx') diff --git a/odb/sqlite/sqlite-types.hxx b/odb/sqlite/sqlite-types.hxx index 38376d9..80ffbd2 100644 --- a/odb/sqlite/sqlite-types.hxx +++ b/odb/sqlite/sqlite-types.hxx @@ -7,6 +7,7 @@ #include +#include #include // std::size_t namespace odb @@ -24,7 +25,9 @@ namespace odb real, // Buffer is double; size, capacity, truncated are unused. text, // Buffer is a UTF-8 char array. text16, // Buffer is a UTF-16 2-byte char array (sizes in bytes). - blob // Buffer is a char array. + blob, // Buffer is a char array. + stream // Buffer is stream_buffers. Size specifies the BLOB size + // (input only). Capacity and truncated unused. }; buffer_type type; @@ -34,6 +37,19 @@ namespace odb bool* is_null; bool* truncated; }; + + // The "out" values should be set in set_image() to point to + // variables that will be receiving the data. The "in" values + // are used in set_value() and contain the data that needs to + // be copied over. + // + struct stream_buffers + { + union {std::string* out; const char* in;} db; + union {std::string* out; const char* in;} table; + union {std::string* out; const char* in;} column; + union {long long* out; long long in;} rowid; + }; } } -- cgit v1.1