aboutsummaryrefslogtreecommitdiff
path: root/mssql/custom/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-03-29 18:51:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-03-29 18:51:07 +0200
commite76ab3a1ac2487e0dcb16ecdfe0c6e53c3f1e86c (patch)
tree981c0f5581bdada9969d5b692dfacbc2c82f123c /mssql/custom/driver.cxx
parent34d177d03f5020ca0ec4bf9b77e20951ed17ff29 (diff)
Add test for custom-mapping SQL Server SQL_VARIANT type
Diffstat (limited to 'mssql/custom/driver.cxx')
-rw-r--r--mssql/custom/driver.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/mssql/custom/driver.cxx b/mssql/custom/driver.cxx
index 142d35c..ebaa790 100644
--- a/mssql/custom/driver.cxx
+++ b/mssql/custom/driver.cxx
@@ -30,6 +30,10 @@ main (int argc, char* argv[])
object o (1);
+ o.v = variant (123);
+ o.vv.push_back (variant (string (1024, 'a')));
+ o.vv.push_back (variant (123));
+
#if !defined(MSSQL_SERVER_VERSION) || MSSQL_SERVER_VERSION >= 1000
o.p = point (1.1111, 2222222222.2);
o.pv.push_back (point (1.1234, 2.2345));
@@ -65,6 +69,13 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
+ // Variant comparison.
+ //
+ {
+ result r (db->query<object> (query::v == o.v));
+ assert (!r.empty ());
+ }
+
#if !defined(MSSQL_SERVER_VERSION) || MSSQL_SERVER_VERSION >= 1000
// Point comparison.
//