(setf computed-result-types (make-array column-count))
(dotimes (i column-count)
(setf (aref computed-result-types i)
- (cond
- ((consp result-types)
- (nth i result-types))
- ((eq result-types :auto)
- (if (eq (aref column-sql-types i) odbc::$SQL_BIGINT)
- :number
- (case (aref column-c-types i)
- (#.odbc::$SQL_BIT :short)
- (#.odbc::$SQL_C_SLONG :int)
- (#.odbc::$SQL_C_DOUBLE :double)
- (#.odbc::$SQL_C_FLOAT :float)
- (#.odbc::$SQL_C_SSHORT :short)
- (#.odbc::$SQL_C_STINYINT :short)
- (#.odbc::$SQL_BIGINT :short)
- (t t))))
- (t
- t)))))
+ (cond
+ ((consp result-types)
+ (nth i result-types))
+ ((eq result-types :auto)
+ (case (aref column-c-types i)
+ (#.odbc::$SQL_C_SLONG :int)
+ (#.odbc::$SQL_C_DOUBLE :double)
+ (#.odbc::$SQL_C_FLOAT :float)
+ (#.odbc::$SQL_C_SSHORT :short)
+ (#.odbc::$SQL_C_STINYINT :short)
+ (#.odbc::$SQL_C_TYPE_TIMESTAMP :time)
+ (t t)))
+ (t t)))))
query)
(defun db-close-query (query &key drop-p)
(declare (ignore args database))
"DATETIME")
+(defmethod database-get-type-specifier ((type (eql 'date)) args database
+ (db-type (eql :mssql)))
+ (declare (ignore args database))
+ "SMALLDATETIME")
+
(defmethod database-get-type-specifier ((type (eql 'boolean)) args database
(db-type (eql :mssql)))
(declare (ignore args database))
(deftest :fddl/attributes/5
(with-dataset *ds-fddl*
- (and (member (clsql:attribute-type [d] [alpha]) '(:datetime :timestamp :date)) t))
+ (and (member (clsql:attribute-type [d] [alpha])
+ '(:datetime :timestamp :date :smalldatetime)) t))
t)
(deftest :fddl/attributes/6