From 3cf717eee40ce39ae7969fe046a53becadb117d7 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 23 May 2004 15:44:02 +0000 Subject: [PATCH] r9453: * db-oracle/oracle-sql.lisp: Add missing database qualifier. Return NUMBER (double) for computed fields, this will require some adjustment to the test suite which in many cases expects integers. --- ChangeLog | 5 ++++- db-oracle/oracle-sql.lisp | 21 +++++++++------------ sql/sequences.lisp | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5bf5a4f..14f2635 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,10 @@ are now in the same order an in the def-view-class. * sql/sql.lisp: Honor case of string table identifier to INSERT-RECORDS * test/test-fddl.lisp: Add two tests for mixed case names - + * db-oracle/oracle-sql.lisp: Add missing database qualifier. Return NUMBER (double) + for computed fields, this will require some adjustment to the test suite which + in many cases expects integers. + 22 May 2004 Kevin Rosenberg * Version 2.10.21 released * sql/sequences.lisp: Move generic sequence functions here from db-sqlite, diff --git a/db-oracle/oracle-sql.lisp b/db-oracle/oracle-sql.lisp index 3c6c226..b4402db 100644 --- a/db-oracle/oracle-sql.lisp +++ b/db-oracle/oracle-sql.lisp @@ -51,8 +51,8 @@ likely that we'll have to worry about the CMUCL limit.")) (eval-when (:compile-toplevel :load-toplevel :execute) (defconstant SQLT-NUMBER 2) (defconstant SQLT-INT 3) - (defconstant SQLT-STR 5) (defconstant SQLT-FLT 4) + (defconstant SQLT-STR 5) (defconstant SQLT-DATE 12)) ;;; Note that despite the suggestive class name (and the way that the @@ -657,9 +657,10 @@ the length of that format.") (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 - ((or (zerop *scale) + ((or (and (zerop *scale) (not (zerop *precision))) (and (minusp *scale) (< *precision 10))) (setf buffer (acquire-foreign-resource :int +n-buf-rows+) sizeof 4 ;; sizeof(int) @@ -910,18 +911,14 @@ the length of that format.") (push row reversed-result)))))) -(defmethod database-create-sequence - (sequence-name (database oracle-database)) +(defmethod database-create-sequence (sequence-name (database oracle-database)) (execute-command - (concatenate 'string "CREATE SEQUENCE " - (sql-escape sequence-name)) + (concatenate 'string "CREATE SEQUENCE " (sql-escape sequence-name)) :database database)) -(defmethod database-drop-sequence - (sequence-name (database oracle-database)) +(defmethod database-drop-sequence (sequence-name (database oracle-database)) (execute-command - (concatenate 'string "DROP SEQUENCE " - (sql-escape sequence-name)) + (concatenate 'string "DROP SEQUENCE " (sql-escape sequence-name)) :database database)) (defmethod database-sequence-next (sequence-name (database oracle-database)) @@ -933,7 +930,7 @@ the length of that format.") ) database :auto nil))) -(defmethod database-set-sequence-position (name position database) +(defmethod database-set-sequence-position (name position (database oracle-database)) (let* ((next (database-sequence-next name database)) (incr (- position next))) (database-execute-command diff --git a/sql/sequences.lisp b/sql/sequences.lisp index 54da54e..b82b9b8 100644 --- a/sql/sequences.lisp +++ b/sql/sequences.lisp @@ -56,7 +56,7 @@ (and sn (list sn)))) (database-list-tables-and-sequences database))) -(defmethod database-set-sequence-position (sequence-name (position integer) database) +(defmethod database-set-sequence-position (sequence-name position database) (database-execute-command (format nil "UPDATE ~A SET last_value=~A,is_called='t'" (%sequence-name-to-table sequence-name database) -- 2.34.1