+(uffi:def-type short-pointer '(* :short))
+(uffi:def-type double-pointer '(* :double))
+
+;;; the result of a database query: a cursor through a table
+(defstruct (oracle-result-set (:print-function print-query-cursor)
+ (:conc-name qc-)
+ (:constructor %make-query-cursor))
+ (db (error "missing DB") ; db conn. this table is associated with
+ :type db
+ :read-only t)
+ (stmthp (error "missing STMTHP") ; the statement handle used to create
+;; :type alien ; this table. owned by the QUERY-CURSOR
+ :read-only t) ; object, deallocated on CLOSE-QUERY
+ (cds) ; (error "missing CDS") ; column descriptors
+; :type (simple-array cd 1)
+ ; :read-only t)
+ (n-from-oci
+ 0 ; buffered rows: number of rows recv'd
+ :type (integer 0 #.+n-buf-rows+)) ; from the database on the last read
+ (n-to-dbi
+ 0 ; number of buffered rows returned, i.e.
+ :type (integer 0 #.+n-buf-rows+)) ; the index, within the buffered rows,
+ ; of the next row which hasn't already
+ ; been returned
+ (total-n-from-oci
+ 0 ; total number of bytes recv'd from OCI
+ :type unsigned-byte) ; in all reads
+ (oci-end-seen-p nil)) ; Have we seen the end of OCI
+ ; data, i.e. OCI returning
+ ; less data than we requested?
+ ; OCI doesn't seem to like us
+ ; to try to read more data
+ ; from it after that..
+
+