diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-05 10:58:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-05 10:58:38 +0200 |
commit | eb20ad512d29475ebf81ae43bca362d40ab3fba2 (patch) | |
tree | 87078786e5d842e30e0d890062f4ed67b3c45272 | |
parent | 0bcac7dde58c0538b9d06f866a0ebd3d60d4001d (diff) |
Fix bug in short national char data querying
-rw-r--r-- | mssql/types/driver.cxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mssql/types/driver.cxx b/mssql/types/driver.cxx index 3f5577f..cd5523d 100644 --- a/mssql/types/driver.cxx +++ b/mssql/types/driver.cxx @@ -127,6 +127,37 @@ main (int argc, char* argv[]) assert (o == *o1); } + + // Test short/long data in queries. + // + typedef odb::query<object> query; + typedef odb::result<object> result; + + { + transaction t (db->begin ()); + + { + result r (db->query<object> (query::svchar == o.svchar_)); + assert (size (r) == 1); + } + + { + result r (db->query<object> (query::snvchar == o.snvchar_)); + assert (size (r) == 1); + } + + { + result r (db->query<object> (query::mvchar == o.mvchar_)); + assert (size (r) == 1); + } + + { + result r (db->query<object> (query::mnvchar == o.mnvchar_)); + assert (size (r) == 1); + } + + t.commit (); + } } // Test long NULL data. |