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 af27bf2..ab3d225 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 4bc5eaf..1b03176 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 a990fe1..f06e1ab 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 13ce8e9..572e5cf 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 e9c6000..61d1c7d 100644 (file)
@@ -52,6 +52,7 @@
           ;;; Types.
           #:sqlite-row
           #:sqlite-row-pointer
+          #:sqlite-row-pointer-type
           #:sqlite-vm-pointer))
 
 (in-package #:sqlite)
index cb3d67a..0c973a8 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 805597b..5a41b4d 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 7ede4ea..dac5884 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