;;;; Author: Kevin M. Rosenberg
;;;; Create: April 2004
;;;;
-;;;; $Id$
-;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;; CLSQL users are granted the rights to distribute and use this software
:accessor data-ptrs)
(column-out-len-ptrs :initform (make-array 0 :adjustable t :fill-pointer t)
:accessor column-out-len-ptrs)
- (column-precisions :initform (make-array 0 :element-type 'fixnum :adjustable t :fill-pointer t)
+ (column-precisions :initform (make-array 0 :element-type 'integer :adjustable t :fill-pointer t)
:accessor column-precisions)
(column-scales :initform (make-array 0 :element-type 'fixnum :adjustable t :fill-pointer t)
:accessor column-scales)
(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_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)
;;((#.odbc::$SQL_BINARY #.odbc::$SQL_VARBINARY #.odbc::$SQL_LONGVARBINARY) odbc::$SQL_C_BINARY) ; ??
(#.odbc::$SQL_TINYINT :short)
;;(#.odbc::$SQL_BIT odbc::$SQL_C_BIT) ; ??
+ (#.odbc::$SQL_BIT :short)
((#.odbc::$SQL_VARBINARY #.odbc::$SQL_LONGVARBINARY) :binary)
))