+(defun make-type-list-for-auto (num-fields res-ptr)
+ (let ((new-types '())
+ #+ignore (field-vec (mysql-fetch-fields res-ptr)))
+ (dotimes (i num-fields)
+ (declare (fixnum i))
+ (let* ( (field (mysql-fetch-field-direct res-ptr i))
+ #+ignore (field (uffi:deref-array field-vec 'mysql-field-vector i))
+ (type (uffi:get-slot-value field 'mysql-field 'type)))
+ (push
+ (case type
+ ((#.mysql-field-types#tiny
+ #.mysql-field-types#short
+ #.mysql-field-types#int24
+ #.mysql-field-types#long)
+ :int32)
+ (#.mysql-field-types#longlong
+ :int64)
+ ((#.mysql-field-types#double
+ #.mysql-field-types#float
+ #.mysql-field-types#decimal)
+ :double)
+ (otherwise
+ t))
+ new-types)))
+ (nreverse new-types)))
+