aboutsummaryrefslogtreecommitdiff
path: root/mssql
diff options
context:
space:
mode:
Diffstat (limited to 'mssql')
-rw-r--r--mssql/types/driver.cxx31
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.