r8887: pre 2.4.0
authorKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 9 Apr 2004 00:51:08 +0000 (00:51 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 9 Apr 2004 00:51:08 +0000 (00:51 +0000)
ChangeLog
TODO
clsql-postgresql-socket.asd
db-postgresql-socket/postgresql-socket-api.lisp
db-sqlite/sqlite-api-uffi.lisp
db-sqlite/sqlite-package.lisp
db-sqlite/sqlite-sql.lisp
debian/changelog

index af27bf2629bfc89e3d14fd0dce5c9b5db5b21637..ab3d225ff0817fa8070247e27f37a940bc4526b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,19 @@
 08 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net)
-       * Version 2.3.4 released
+       * Version 2.4.0 released: All tests for clsql-classic now finish
+       correctly on Allegro, Lispworks, CMUCL, SBCL, OpenMCL for
+       mysql and postgresql backends. postgresql-socket backend
+       passes all tests for Allegro, Lispworks, CMUCL, and SBCL.
        * db-mysql/mysql-sql.lisp: Fix array dereferencing
        * classic-tests/tests.lisp: Fix package name of
        number-to-sql-string. 
        * clsql.asd/clsql-tests.asd: Add support for asdf:test-op
-       * Finish renaming of :types keyword to :result-types for
+       * db-sqlite/sqlite-api-uffi.lisp: Fix type UFFI usage
+       found by testing on OpenMCL
+       * db-postgresql-socket/postgresql-socket-api.list: Ported to 
+       SBCL
+       * multiple: Finish renaming of :types keyword to :result-types for
        greater CommonSQL compatibility, including documentation
        * sql/basic-cmds.lisp: Remove obsolete file
-       * All tests for clsql-classic now finish correctly on
-       Allegro, Lispworks, CMUCL, SBCL
        
 08 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 2.3.3 released
diff --git a/TODO b/TODO
index 4bc5eafe430921c7012cda874ffea2dff95ba972..1b031763174e24aab28ed0b9edbdd72c3c5fecbc 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,9 +1,10 @@
 GENERAL 
 
-* test on (and port to) scl, mcl and openmcl; 
-* implement remaining functions for CLSQL AODBC backend; 
-* port UncommonSQL ODBC and Oracle backends to CLSQL. 
-
+* test on (and port to) openmcl and mcl. SCL no longer affordable to
+  individuals;
+* implement remaining functions for CLSQL AODBC backend;
+* port Oracle and ODBC backend to UFFI.
+* port postgresql-socket backend to OpenMCL
 
 COMMONSQL SPEC
 
index a990fe12e1cc026e32dbac00dc7157480f702450..f06e1ab16f8969642d299e7cc247c2b902995cbd 100644 (file)
@@ -30,7 +30,7 @@
   :description "Common Lisp SQL PostgreSQL Socket Driver"
   :long-description "cl-sql-postgresql-socket package provides a database driver to the PostgreSQL database via a socket interface."
 
-  :depends-on (clsql-base uffi md5)
+  :depends-on (clsql-base uffi md5 #+sbcl sb-bsd-sockets)
   :components
   ((:module :db-postgresql-socket
            :components
index 13ce8e9965d2f5a1765796c904c4bdaabd5e162f..572e5cf7b16794caee2dd2934031c75f0d7cef0c 100644 (file)
@@ -310,7 +310,6 @@ socket interface"
 (defvar *postgresql-server-socket-timeout* 60
   "Timeout in seconds for reads from the PostgreSQL server.")
 
-
 #+(or cmu scl)
 (defun open-postgresql-socket (host port)
   (etypecase host
@@ -323,6 +322,26 @@ socket interface"
     (string
      (ext:connect-to-inet-socket host port))))
 
+#+sbcl
+(defun open-postgresql-socket (host port)
+  (etypecase host
+    (pathname
+     ;; Directory to unix-domain socket
+     (sb-bsd-sockets:socket-connect
+      (namestring
+       (make-pathname :name ".s.PGSQL" :type (princ-to-string port)
+                     :defaults host))))
+    (string
+     (let ((sock (make-instance 'sb-bsd-sockets:inet-socket
+                               :type :stream
+                               :protocol :tcp)))
+       (sb-bsd-sockets:socket-connect 
+       sock 
+       (sb-bsd-sockets:host-ent-address
+        (sb-bsd-sockets:get-host-by-name host)) 
+       port)
+       sock))))
+
 #+(or cmu scl)
 (defun open-postgresql-socket-stream (host port)
   (system:make-fd-stream
@@ -334,11 +353,10 @@ socket interface"
 
 #+sbcl
 (defun open-postgresql-socket-stream (host port)
-  (sb-sys:make-fd-stream
-   (open-postgresql-socket host port)
-   :input t :output t :element-type '(unsigned-byte 8)
-   :buffering :none
-   :timeout *postgresql-server-socket-timeout*))
+  (sb-bsd-sockets:socket-make-stream
+   (open-postgresql-socket host port) :input t :output t 
+   :element-type '(unsigned-byte 8)))
+  
 
 #+allegro
 (defun open-postgresql-socket-stream (host port)
index e9c6000037c88183b875ad8a8b7ee77a9978c6ba..61d1c7dcd8588056fde2dc6bbb68f38776570441 100644 (file)
@@ -52,6 +52,7 @@
           ;;; Types.
           #:sqlite-row
           #:sqlite-row-pointer
+          #:sqlite-row-pointer-type
           #:sqlite-vm-pointer))
 
 (in-package #:sqlite)
index cb3d67a9b207f4b38c8f183e1455daff6b681ce0..0c973a817358d36d10b38da186611095cf306909 100644 (file)
@@ -16,8 +16,8 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package :cl-user)
+(in-package #:cl-user)
 
-(defpackage :clsql-sqlite
-  (:use :common-lisp :clsql-base-sys)
+(defpackage #:clsql-sqlite
+  (:use #:common-lisp #:clsql-base-sys)
   (:export #:sqlite-database))
index 805597b0bd086a8faea3c2080d89616d3faaa2ce..5a41b4d10ddef7273e9f2da8308ef21d46cd90e2 100644 (file)
@@ -78,7 +78,7 @@
   (handler-case
       (multiple-value-bind (data row-n col-n)
          (sqlite:sqlite-get-table (sqlite-db database) query-expression)
-       #-clisp (declare (type sqlite:sqlite-row-pointer data))
+       #-clisp (declare (type sqlite:sqlite-row-pointer-type data))
        (if (= row-n 0)
            nil
            (prog1
   (vm (sqlite:make-null-vm)
       :type sqlite:sqlite-vm-pointer)
   (first-row (sqlite:make-null-row)
-            :type sqlite:sqlite-row-pointer)
+            :type sqlite:sqlite-row-pointer-type)
   (n-col 0 :type fixnum))
 #+clisp
 (defstruct sqlite-result-set
        (multiple-value-bind (n-col cols col-names)
            (sqlite:sqlite-step vm)
          (declare (ignore col-names)
-                  #-clisp (type sqlite:sqlite-row-pointer cols)
+                  #-clisp (type sqlite:sqlite-row-pointer-type cols)
                   )
          (setf (sqlite-result-set-first-row result-set) cols
                (sqlite-result-set-n-col result-set) n-col)
                  (multiple-value-bind (n new-row col-names)
                      (sqlite:sqlite-step (sqlite-result-set-vm result-set))
                    (declare (ignore n col-names)
-                            #-clisp (type sqlite:sqlite-row-pointer new-row)
+                            #-clisp (type sqlite:sqlite-row-pointer-type new-row)
                             )
                    (if (sqlite:null-row-p new-row)
                        (return-from database-store-next-row nil)
index 7ede4eaf43c5b9be4c9b179e6766faffe800ac9e..dac58845a0d3957207e73f1c330f18a8c859942a 100644 (file)
@@ -1,3 +1,9 @@
+cl-sql (2.4.0-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Thu,  8 Apr 2004 18:10:27 -0600
+
 cl-sql (2.3.4-1) unstable; urgency=low
 
   * New upstream