diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-09-10 12:12:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-09-10 12:12:06 +0200 |
commit | 32fcd732e2535090174142dd15b8b74fc444a9c2 (patch) | |
tree | 0d869cf45f1282cc1ac04e0d8171410d59d16a1f /sqlite/types/test.hxx | |
parent | 4e7f517a711d9b6e95512cad1891710bcd591034 (diff) |
Add support for alternative UTF-16 image for TEXT in SQLite
Use it to handle QString and support std::wstring on Windows.
Diffstat (limited to 'sqlite/types/test.hxx')
-rw-r--r-- | sqlite/types/test.hxx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sqlite/types/test.hxx b/sqlite/types/test.hxx index 897590d..bd8f48a 100644 --- a/sqlite/types/test.hxx +++ b/sqlite/types/test.hxx @@ -44,6 +44,10 @@ struct object #pragma db type("TEXT") std::string text_; +#ifdef _WIN32 + std::string wtext_; +#endif + #pragma db type("BLOB") std::vector<char> blob_; @@ -55,15 +59,17 @@ struct object bool operator== (const object& y) const { - return - id_ == y.id_ && - bool_ == y.bool_ && - integer_ == y.integer_ && - real_ == y.real_ && - nan_ != nan_ && - text_ == y.text_ && - blob_ == y.blob_ && - ((null_.get () == 0 && y.null_.get () == 0) || *null_ == *y.null_); + return id_ == y.id_ + && bool_ == y.bool_ + && integer_ == y.integer_ + && real_ == y.real_ + && nan_ != nan_ + && text_ == y.text_ +#ifdef _WIN32 + && wtext_ == y.wtext_ +#endif + && blob_ == y.blob_ + && ((null_.get () == 0 && y.null_.get () == 0) || *null_ == *y.null_); } }; |