From 3ac67fb63eec3534046fe2eb72bc2d37aca1cd98 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov SQLite represents the The first constructor opens the specified SQLite database. The
- The second constructor is the same as the first except that the database
- name is passes as TEXT
+
+ NOT NULL
+
+ std::wstring (Windows only)
+ TEXT
+ NOT NULL
NaN
FLOAT
value
@@ -14030,8 +14036,8 @@ namespace odb
header file to make this class available in your application.name
argument is the database file
- name to open. If this argument is empty, then a temporary,
+ name
argument is the database file name to open in
+ the UTF-8 encoding. If this argument is empty, then a temporary,
on-disk database is created. If this argument is the
:memory:
special value, then a temporary, in-memory
database is created. The flags
argument allows us to
@@ -14058,8 +14064,8 @@ auto_ptr<odb::database> db (
std::wstring
. This constructor is only
- available when compiling for Windows.std::wstring
in the UTF-16 encoding. This
+ constructor is only available when compiling for Windows.
The third constructor extracts the database parameters from the command line. The following options are recognized:
diff --git a/odb/relational/sqlite/context.cxx b/odb/relational/sqlite/context.cxx index 52c7751..5dc3fa8 100644 --- a/odb/relational/sqlite/context.cxx +++ b/odb/relational/sqlite/context.cxx @@ -53,7 +53,8 @@ namespace relational {"float", "REAL", 0, true}, {"double", "REAL", 0, true}, - {"::std::string", "TEXT", 0, false} + {"::std::string", "TEXT", 0, false}, + {"::std::wstring", "TEXT", 0, false} }; } diff --git a/odb/relational/sqlite/source.cxx b/odb/relational/sqlite/source.cxx index 1e93568..7d29c1e 100644 --- a/odb/relational/sqlite/source.cxx +++ b/odb/relational/sqlite/source.cxx @@ -51,7 +51,9 @@ namespace relational virtual void traverse_text (member_info& mi) { - os << b << ".type = sqlite::bind::text;" + os << b << ".type = sqlite::image_traits<" << endl + << " " << mi.fq_type () << "," << endl + << " sqlite::id_text>::bind_value;" << b << ".buffer = " << arg << "." << mi.var << "value.data ();" << b << ".size = &" << arg << "." << mi.var << "size;" << b << ".capacity = " << arg << "." << mi.var << -- cgit v1.1