* db-oracle/make9.sh: add makefile for building with Oracle 9 client
libraries
* sql/table.lisp: Add logic for dealing with Oracle 10g vs. previous
Oracle versions with the PURGE option required for drop table. This needs
to be converted to a generic function and moved to db-oracle/oracle-sql.lisp
2
+20 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
+ * db-oracle/make9.sh: add makefile for building with Oracle 9 client
+ libraries
+ * sql/table.lisp: Add logic for dealing with Oracle 10g vs. previous
+ Oracle versions with the PURGE option required for drop table. This needs
+ to be converted to a generic function and moved to db-oracle/oracle-sql.lisp
+
20 May 2004 Marcus Pearce (m.t.pearce@city.ac.uk)
* sql/classes.lisp: remove unused PARAMS slot in SQL-IDENT-ATTRIBUTE.
* sql/syntax.lisp: remove unused PARAMS keyword arg to SQL-EXPRESSION.
20 May 2004 Marcus Pearce (m.t.pearce@city.ac.uk)
* sql/classes.lisp: remove unused PARAMS slot in SQL-IDENT-ATTRIBUTE.
* sql/syntax.lisp: remove unused PARAMS keyword arg to SQL-EXPRESSION.
+# Make shared library for Oracle 10
+
if [ -z "$ORACLE_HOME" ]; then
ORACLE_HOME=/10g/app/product/10.1.0/db_1
fi
if [ -z "$ORACLE_HOME" ]; then
ORACLE_HOME=/10g/app/product/10.1.0/db_1
fi
--- /dev/null
+# Make shared library for Oracle 9
+
+if [ -z "$ORACLE_HOME" ]; then
+ ORACLE_HOME=/9i
+fi
+
+EMPTY_LIBS=-lclntst9
+LIBS="-lagent9 -lagtsh -lclntsh -lclntst9 -lclient9 -lvsn9 -lcommon9 -lskgxp9 -lmm -lnls9 -lcore9 -lgeneric9 -ltrace9 -ldl -lgcc -lm"
+OBJECTS="rdbms/lib/defopt.o"
+LIBNAME=oracle
+
+gcc -shared ${ORACLE_HOME}/rdbms/lib/homts.o -L ${ORACLE_HOME}/lib $LIBS -o ${LIBNAME}.so
(uffi:find-foreign-library
"oracle"
`(,(make-pathname :directory (pathname-directory *load-truename*))
(uffi:find-foreign-library
"oracle"
`(,(make-pathname :directory (pathname-directory *load-truename*))
"/usr/lib/clsql/"
"/sw/lib/clsql/"
"/home/kevin/debian/src/clsql/db-oracle/")
"/usr/lib/clsql/"
"/sw/lib/clsql/"
"/home/kevin/debian/src/clsql/db-oracle/")
(cond
((search " 10g " str)
10)
(cond
((search " 10g " str)
10)
+ ((search "Oracle9i " str)
(execute-command stmt :database database)))
(defun drop-table (name &key (if-does-not-exist :error)
(execute-command stmt :database database)))
(defun drop-table (name &key (if-does-not-exist :error)
- (database *default-database*))
+ (database *default-database*))
"Drops the table called NAME from DATABASE which defaults to
*DEFAULT-DATABASE*. If the table does not exist and
IF-DOES-NOT-EXIST is :ignore then DROP-TABLE returns nil whereas
"Drops the table called NAME from DATABASE which defaults to
*DEFAULT-DATABASE*. If the table does not exist and
IF-DOES-NOT-EXIST is :ignore then DROP-TABLE returns nil whereas
(return-from drop-table nil)))
(:error
t))
(return-from drop-table nil)))
(:error
t))
- (let ((expr (concatenate 'string "DROP TABLE " table-name
- (if (eq :oracle (database-type database))
- " PURGE"
- ""))))
+
+ ;; Fixme: move to clsql-oracle
+ (let ((expr (concatenate 'string "DROP TABLE " table-name)))
+ (when (and (find-package 'clsql-oracle)
+ (eq :oracle (database-type database))
+ (eql 9 (slot-value database
+ (intern (symbol-name '#:major-version-number)
+ (symbol-name '#:clsql-oracle)))))
+ (setq expr (concatenate 'string expr " PURGE")))
+
(execute-command expr :database database))))
(defun list-tables (&key (owner nil) (database *default-database*))
(execute-command expr :database database))))
(defun list-tables (&key (owner nil) (database *default-database*))