projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9491: * db-oracle/oracle-objects.lisp: Add database-get-type-specifier for
[clsql.git]
/
db-oracle
/
oracle-sql.lisp
diff --git
a/db-oracle/oracle-sql.lisp
b/db-oracle/oracle-sql.lisp
index 8ef460229a203916744008f860aa007f7e5b4ed8..119a669f6db1c744dc282e96195c74ad884eb757 100644
(file)
--- a/
db-oracle/oracle-sql.lisp
+++ b/
db-oracle/oracle-sql.lisp
@@
-395,7
+395,13
@@
the length of that format.")
(#.SQLT-FLT
(uffi:deref-array b '(:array :double) irow))
(#.SQLT-INT
(#.SQLT-FLT
(uffi:deref-array b '(:array :double) irow))
(#.SQLT-INT
- (uffi:deref-array b '(:array :int) irow))
+ (ecase (cd-sizeof cd)
+ (4
+ (uffi:deref-array b '(:array :int) irow))
+ (8
+ (deref-oci-int64 b irow))
+ (16
+ (deref-oci-int128 b irow))))
(#.SQLT-DATE
(deref-oci-string b irow (cd-sizeof cd))))))))
(when (and (eq :string (cd-result-type cd))
(#.SQLT-DATE
(deref-oci-string b irow (cd-sizeof cd))))))))
(when (and (eq :string (cd-result-type cd))
@@
-625,11
+631,11
@@
the length of that format.")
(deref-vp errhp))
(let ((*scale (uffi:deref-pointer scale :byte))
(*precision (uffi:deref-pointer precision :byte)))
(deref-vp errhp))
(let ((*scale (uffi:deref-pointer scale :byte))
(*precision (uffi:deref-pointer precision :byte)))
-
- ;;
(format t "scale=~d, precision=~d~%" *scale *precision)
+
+ ;;(format t "scale=~d, precision=~d~%" *scale *precision)
(cond
(cond
- ((or (and (
zerop *scale) (not (zerop *precision)
))
- (and (
minusp *scale) (< *precision 10
)))
+ ((or (and (
minusp *scale) (zerop *precision
))
+ (and (
zerop *scale) (plusp *precision
)))
(setf buffer (acquire-foreign-resource :int +n-buf-rows+)
sizeof 4 ;; sizeof(int)
dtype #.SQLT-INT))
(setf buffer (acquire-foreign-resource :int +n-buf-rows+)
sizeof 4 ;; sizeof(int)
dtype #.SQLT-INT))