r8973: add makefiles, remove explain function, fix truncate
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 12 Apr 2004 17:56:57 +0000 (17:56 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 12 Apr 2004 17:56:57 +0000 (17:56 +0000)
ChangeLog
Makefile
base/basic-sql.lisp
base/database.lisp
db-sqlite/Makefile [new file with mode: 0644]
sql/sql.lisp
tests/Makefile [new file with mode: 0644]

index c095a50308ae5829f9f4b2e2c820407058c9d8e0..ac3e51724b8173773a24a1bfcc2c7845b2119a61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+12 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net)
+       * Version 2.6.5
+       * sql/sql.lisp: Fix TRUNCATE command, bug reported
+       by Marcus Pearce
+       * sql/sql.lisp: Remove EXPLAIN function. Postgresql/Oracle
+       specific and easy for an application to directly support.
+       Idea from Marcus Pearce.
+       * base/basic-sql.lisp: Remove DESCRIBE-TABLE top-level 
+       API as duplicates LIST-ATTRIBUTE-TYPES [Marcus Pearce].
+       Keep low-level interface for future optimization
+       supporting LIST-ATTRIBUTE-TYPES command.
+       * Makefile: Add to db-sqlite and test directories.
+       Include them in top-level Makefile
+       
 12 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 2.6.5
        * sql/relations.lisp: Add missing file
 12 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 2.6.5
        * sql/relations.lisp: Add missing file
index 564b092ee5d37d55662c410f96fb3938ac6c7bdb..1860a3a922d621c8fcdfc196bf43b391a3a49016 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,8 +15,8 @@
 
 PKG    := clsql
 DEBPKG := cl-sql
 
 PKG    := clsql
 DEBPKG := cl-sql
-SUBDIRS        := sql uffi base db-mysql db-aodbc \
-          db-postgresql db-postgresql-socket 
+SUBDIRS        := sql tests uffi base db-mysql db-aodbc \
+          db-postgresql db-postgresql-socket db-sqlite
 DOCSUBDIRS:=doc
 
 include Makefile.common
 DOCSUBDIRS:=doc
 
 include Makefile.common
index 5c12002bcfe527802991a4d4ebd2ca16629778cb..38733147d990750b4eb971c90a5c96d96b734561 100644 (file)
@@ -59,10 +59,6 @@ pair."))
     (record-sql-action res :result database))
   (values))
 
     (record-sql-action res :result database))
   (values))
 
-
-(defmethod describe-table ((table string) &key (database *default-database*))
-  (database-describe-table database table))
-
 (defmacro do-query (((&rest args) query-expression
                     &key (database '*default-database*) (result-types nil))
                    &body body)
 (defmacro do-query (((&rest args) query-expression
                     &key (database '*default-database*) (result-types nil))
                    &body body)
index 5f00b3867aee1b08c8b23d2eb7b712e23fbfca79..1c6fa63ee82fc12911175575a755470b3e8854aa 100644 (file)
@@ -176,10 +176,10 @@ error should be signaled if the existing database connection cannot be
 closed. When non-nil (this is the default value) the connection is
 closed without error checking. When FORCE is nil, an error is signaled
 if the database connection has been lost."
 closed. When non-nil (this is the default value) the connection is
 closed without error checking. When FORCE is nil, an error is signaled
 if the database connection has been lost."
-  ;; TODO: just a placeholder
+  ;; TODO: Support all backends. Perhaps integrate with pools
+  ;; Handle error and force keywords
   (declare (ignore database error force)))
 
   (declare (ignore database error force)))
 
-
   
 (defun status (&optional full)
   "The function STATUS prints status information to the standard
   
 (defun status (&optional full)
   "The function STATUS prints status information to the standard
diff --git a/db-sqlite/Makefile b/db-sqlite/Makefile
new file mode 100644 (file)
index 0000000..2b79dcb
--- /dev/null
@@ -0,0 +1,22 @@
+# FILE IDENTIFICATION
+#
+#  Name:         Makefile
+#  Purpose:      Makefile for CLSQL SQL interface
+#  Programer:    Kevin M. Rosenberg
+#  Date Started: Mar 2002
+#
+#  CVS Id:   $Id: Makefile 8153 2003-11-11 15:28:36Z kevin $
+#
+# This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
+#
+# CLSQL users are granted the rights to distribute and use this software
+# as governed by the terms of the Lisp Lesser GNU Public License
+# (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+
+SUBDIRS=
+
+include ../Makefile.common
+
+.PHONY: distclean
+distclean: clean
+
index a904c89ba7af437459d289932cc3f3c4bb6fda18..28d5a922b857a4f9dd9387f497ddcc02d5a7c2f1 100644 (file)
   (execute-command (sql-output expr database) :database database)
   (values))
 
   (execute-command (sql-output expr database) :database database)
   (values))
 
-(defmethod explain ((expr %sql-expression) &key (database *default-database*))
-  (let ((expression (sql-output expr database)))
-    (format *standard-output* "explain: ~S~%" expression)
-    (execute-command (concatenate 'string "explain " expression))))
-
 
 (defmethod query ((expr %sql-expression) &key (database *default-database*)
                   (result-types nil) (flatp nil))
 
 (defmethod query ((expr %sql-expression) &key (database *default-database*)
                   (result-types nil) (flatp nil))
   (unless (is-database-open database)
     (database-reconnect database))
   (dolist (table (list-tables database))
   (unless (is-database-open database)
     (database-reconnect database))
   (dolist (table (list-tables database))
-    (drop-table table database))
+    (drop-table table :database database))
   (dolist (index (list-indexes database))
   (dolist (index (list-indexes database))
-    (drop-index index database))
+    (drop-index index :database database))
   (dolist (seq (list-sequences database))
   (dolist (seq (list-sequences database))
-    (drop-sequence seq database)))
+    (drop-sequence seq :database database)))
 
 (defun print-query (query-exp &key titles (formats t) (sizes t) (stream t)
                              (database *default-database*))
 
 (defun print-query (query-exp &key titles (formats t) (sizes t) (stream t)
                              (database *default-database*))
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644 (file)
index 0000000..2b79dcb
--- /dev/null
@@ -0,0 +1,22 @@
+# FILE IDENTIFICATION
+#
+#  Name:         Makefile
+#  Purpose:      Makefile for CLSQL SQL interface
+#  Programer:    Kevin M. Rosenberg
+#  Date Started: Mar 2002
+#
+#  CVS Id:   $Id: Makefile 8153 2003-11-11 15:28:36Z kevin $
+#
+# This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
+#
+# CLSQL users are granted the rights to distribute and use this software
+# as governed by the terms of the Lisp Lesser GNU Public License
+# (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+
+SUBDIRS=
+
+include ../Makefile.common
+
+.PHONY: distclean
+distclean: clean
+