(if (plusp (column-count free-query)) ;; KMR: Added check for commands that don't return columns
(values
(db-fetch-query-results free-query nil)
(if (plusp (column-count free-query)) ;; KMR: Added check for commands that don't return columns
(values
(db-fetch-query-results free-query nil)
"get-free-query finds or makes a nonactive query object, and then sets it to active.
This makes the functions db-execute-command and db-query thread safe."
(with-slots (queries hdbc) database
"get-free-query finds or makes a nonactive query object, and then sets it to active.
This makes the functions db-execute-command and db-query thread safe."
(with-slots (queries hdbc) database
(#.odbc::$SQL_C_DOUBLE :double)
(#.odbc::$SQL_C_FLOAT :float)
(#.odbc::$SQL_C_SSHORT :short)
(#.odbc::$SQL_C_DOUBLE :double)
(#.odbc::$SQL_C_FLOAT :float)
(#.odbc::$SQL_C_SSHORT :short)
;; free-statment :unbind frees these
#+ignore (when data-ptr (uffi:free-foreign-object data-ptr))
#+ignore (when out-len-ptr (uffi:free-foreign-object out-len-ptr)))))
;; free-statment :unbind frees these
#+ignore (when data-ptr (uffi:free-foreign-object data-ptr))
#+ignore (when out-len-ptr (uffi:free-foreign-object out-len-ptr)))))
(ecase sql-type
((#.odbc::$SQL_CHAR #.odbc::$SQL_VARCHAR #.odbc::$SQL_LONGVARCHAR) :string)
((#.odbc::$SQL_NUMERIC #.odbc::$SQL_DECIMAL #.odbc::$SQL_BIGINT) :string) ; ??
(ecase sql-type
((#.odbc::$SQL_CHAR #.odbc::$SQL_VARCHAR #.odbc::$SQL_LONGVARCHAR) :string)
((#.odbc::$SQL_NUMERIC #.odbc::$SQL_DECIMAL #.odbc::$SQL_BIGINT) :string) ; ??
(#.odbc::$SQL_DATE 'sql-c-date)
(#.odbc::$SQL_TIME 'sql-c-time)
(#.odbc::$SQL_TIMESTAMP 'sql-c-timestamp)
(#.odbc::$SQL_DATE 'sql-c-date)
(#.odbc::$SQL_TIME 'sql-c-time)
(#.odbc::$SQL_TIMESTAMP 'sql-c-timestamp)