summaryrefslogtreecommitdiff
path: root/libodbcpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-05-02 21:20:53 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-05-02 21:23:43 +0100
commitfa0fc012df5b36676754bac17c2a28d330e226ae (patch)
tree40712e54b511d774b3b4df22505225ce8f3cd3f3 /libodbcpp
parentFix parameter specification on interval types (diff)
downloadlibdbpp-odbc-fa0fc012df5b36676754bac17c2a28d330e226ae.tar.bz2
libdbpp-odbc-fa0fc012df5b36676754bac17c2a28d330e226ae.tar.xz
libdbpp-odbc-fa0fc012df5b36676754bac17c2a28d330e226ae.zip
Add mocking and tests for ODBC.
Note: whilst intervals sort of work, ODBC thinks the column is a longvarchar in PQ, so the UTs don't cover it. Also note: the ODBC UT mock is a hack over the PQ one, probably not suitable for general purpose use
Diffstat (limited to 'libodbcpp')
-rw-r--r--libodbcpp/selectcommand.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libodbcpp/selectcommand.cpp b/libodbcpp/selectcommand.cpp
index 9a306c3..07b185e 100644
--- a/libodbcpp/selectcommand.cpp
+++ b/libodbcpp/selectcommand.cpp
@@ -130,6 +130,8 @@ ODBC::SelectCommand::execute()
case SQL_TYPE_TIMESTAMP:
ncol = *columns.insert(DB::ColumnPtr(new TimeStampColumn(this, colName, col))).first;
break;
+ case SQL_UNKNOWN_TYPE:
+ throw Error("Unknown column type");
default:
ncol = *columns.insert(DB::ColumnPtr(new CharArrayColumn(this, colName, col, bindSize))).first;
break;