From fa0fc012df5b36676754bac17c2a28d330e226ae Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 2 May 2015 21:20:53 +0100 Subject: 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 --- libodbcpp/selectcommand.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libodbcpp') 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; -- cgit v1.2.3