diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-12-22 11:50:32 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-01-20 15:45:46 +0200 |
commit | 2a8f6db525ba7f400c170cdd6321dcb20c2d24e3 (patch) | |
tree | df9dcde0d665caf464cdbb41b3458ff16a945d11 /mssql/types/driver.cxx | |
parent | 089a36ee4a3c7bf6d7288f021f135b8c4ffce8a0 (diff) |
Test SQL Server long data in container
Diffstat (limited to 'mssql/types/driver.cxx')
-rw-r--r-- | mssql/types/driver.cxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mssql/types/driver.cxx b/mssql/types/driver.cxx index 2266792..f4c9452 100644 --- a/mssql/types/driver.cxx +++ b/mssql/types/driver.cxx @@ -149,6 +149,33 @@ main (int argc, char* argv[]) assert (o2 == *p2); } } + + // Test long data in containers. + // + { + long_cont o (1); + o.v.push_back (long_comp ("aaa", 123)); + o.v.push_back (long_comp (string (500, 'b'), 234)); + o.v.push_back (long_comp (string (70000, 'c'), 345)); + + // Persist. + // + { + transaction t (db->begin ()); + db->persist (o); + t.commit (); + } + + // Load. + // + { + transaction t (db->begin ()); + auto_ptr<long_cont> p (db->load<long_cont> (1)); + t.commit (); + + assert (o == *p); + } + } } catch (const odb::exception& e) { |