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:44:22 +0200 |
commit | 8f6a9c51bc64226d7c296e4b0172f9e56a7eea3b (patch) | |
tree | 3274ba7b223cd330e7d6bd29844ad5cabfadc82a /odb/relational/sqlite/context.cxx | |
parent | 4d134880196e85e06d5ff4e83a26a3b15027706a (diff) |
Implement SQLite incremental BLOB/TEXT I/O
Diffstat (limited to 'odb/relational/sqlite/context.cxx')
-rw-r--r-- | odb/relational/sqlite/context.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/odb/relational/sqlite/context.cxx b/odb/relational/sqlite/context.cxx index 007d67f..94b8067 100644 --- a/odb/relational/sqlite/context.cxx +++ b/odb/relational/sqlite/context.cxx @@ -339,10 +339,23 @@ namespace relational if (ids_.empty ()) return error ("expected SQLite type name"); + // First check our own types. + // + if (ids_.size () == 2 && ids_[0] == "TEXT" && ids_[1] == "STREAM") + { + r.type = sql_type::TEXT; + r.stream = true; + } + if (ids_.size () == 2 && ids_[0] == "BLOB" && ids_[1] == "STREAM") + { + r.type = sql_type::BLOB; + r.stream = true; + } + // // Apply the first four rules of the SQLite type to affinity // conversion algorithm. // - if (find ("INT")) + else if (find ("INT")) r.type = sql_type::INTEGER; else if (find ("TEXT") || find ("CHAR") || find ("CLOB")) r.type = sql_type::TEXT; |