diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-10 17:53:38 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-10 17:53:38 +0000 |
commit | 564d41222d8e4b3c147fb8ab3fa22ca5bbbf8391 (patch) | |
tree | 6e5fa9ca9f88749e24d7cc7369d25083ddc1510a /libpqpp/unittests | |
parent | Only open select transactions when the connection doesn't already have one (diff) | |
download | libdbpp-postgresql-564d41222d8e4b3c147fb8ab3fa22ca5bbbf8391.tar.bz2 libdbpp-postgresql-564d41222d8e4b3c147fb8ab3fa22ca5bbbf8391.tar.xz libdbpp-postgresql-564d41222d8e4b3c147fb8ab3fa22ca5bbbf8391.zip |
Close select tx after close cursor, add error checking
Diffstat (limited to 'libpqpp/unittests')
-rw-r--r-- | libpqpp/unittests/testpq.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpqpp/unittests/testpq.cpp b/libpqpp/unittests/testpq.cpp index c49fa34..96e5611 100644 --- a/libpqpp/unittests/testpq.cpp +++ b/libpqpp/unittests/testpq.cpp @@ -160,6 +160,15 @@ BOOST_AUTO_TEST_CASE( bulkload ) delete ro; } +BOOST_AUTO_TEST_CASE( nofetch ) +{ + auto ro = DB::MockDatabase::openConnectionTo("pqmock"); + auto count = ro->newSelectCommand("SELECT * FROM bulktest"); + count->execute(); + delete count; + delete ro; +} + BOOST_AUTO_TEST_CASE( bigIterate ) { auto ro = DB::MockDatabase::openConnectionTo("pqmock"); |