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/model.cxx | |
parent | 4d134880196e85e06d5ff4e83a26a3b15027706a (diff) |
Implement SQLite incremental BLOB/TEXT I/O
Diffstat (limited to 'odb/relational/sqlite/model.cxx')
-rw-r--r-- | odb/relational/sqlite/model.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/odb/relational/sqlite/model.cxx b/odb/relational/sqlite/model.cxx index 47eb88b..45216b7 100644 --- a/odb/relational/sqlite/model.cxx +++ b/odb/relational/sqlite/model.cxx @@ -23,6 +23,27 @@ namespace relational { object_columns (base const& x): base (x) {} + virtual string + type (semantics::data_member& m) + { + // Translate BLOB|TEXT STREAM to just BLOB|TEXT. + // + string r (relational::object_columns::type (m)); + + sql_type const& t (parse_sql_type (r, m, false)); + if (t.stream) + { + switch (t.type) + { + case sql_type::BLOB: r = "BLOB"; break; + case sql_type::TEXT: r = "TEXT"; break; + default: break; + } + } + + return r; + } + virtual bool null (semantics::data_member& m) { |