X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-odbc%2Fodbc-dbi.lisp;h=319a8cc1ccea95dc97dfd0cc2974e29d69f4bee7;hb=93eb4aa202e6a122f11f37ea45a7a9ced104712a;hp=5c57c2e7afed17ee53df894ac4865195fda893ff;hpb=d93955e3f6ad71eb27f334c50f997b4d351724c3;p=clsql.git diff --git a/db-odbc/odbc-dbi.lisp b/db-odbc/odbc-dbi.lisp index 5c57c2e..319a8cc 100644 --- a/db-odbc/odbc-dbi.lisp +++ b/db-odbc/odbc-dbi.lisp @@ -328,7 +328,7 @@ the query against." )) (cond ((< 0 precision (query-width query)) (read-data data-ptr c-type sql-type out-len-ptr result-type)) ((zerop (get-cast-long out-len-ptr)) - nil) + nil) (t (read-data-in-chunks hstmt j data-ptr c-type sql-type out-len-ptr result-type)))))))) @@ -450,6 +450,7 @@ This makes the functions db-execute-command and db-query thread safe." ;; get column information (initialize-column col-nr)))) + ;; TODO: move this into the above loop (setf computed-result-types (make-array column-count)) (dotimes (i column-count) (setf (aref computed-result-types i) @@ -465,6 +466,11 @@ This makes the functions db-execute-command and db-query thread safe." (#.odbc::$SQL_C_STINYINT :short) (#.odbc::$SQL_C_SBIGINT #.odbc::$ODBC-BIG-TYPE) (#.odbc::$SQL_C_TYPE_TIMESTAMP :time) + (#.odbc::$SQL_C_CHAR ;; TODO: Read this as rational instead of double + (or (case (aref column-sql-types i) + (#.odbc::$SQL_NUMERIC :double)) + T)) + (t t))) (t t))))) query)