diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-07-15 18:43:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-07-15 18:43:03 +0200 |
commit | 0f9cfacd6cc45f78f1453a8eeb7ffa542dc5dc48 (patch) | |
tree | 76b5baf158e35988d7b14d437f1a03774e0e0742 /odb/sqlite/sqlite-types.hxx | |
parent | 27a578709046a81bb0efc0027bfc74318615447e (diff) |
Implement SQLite incremental BLOB/TEXT I/O
Diffstat (limited to 'odb/sqlite/sqlite-types.hxx')
-rw-r--r-- | odb/sqlite/sqlite-types.hxx | 18 |
1 files changed, 17 insertions, 1 deletions
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 <odb/pre.hxx> +#include <string> #include <cstddef> // 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; + }; } } |