From b06cb6d32e2a334f7dc72e8fb583a5b9609136b7 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 23 Mar 2002 17:10:48 +0000 Subject: [PATCH] r1647: *** empty log message *** --- clsql-mysql.system | 6 +-- clsql-postgresql-socket.system | 6 +-- clsql-postgresql.system | 6 +-- .../mysql/{mysql-uffi.cl => mysql-api.cl} | 2 +- interfaces/mysql/mysql-sql.cl | 48 +++++++++--------- ...ocket-uffi.cl => postgresql-socket-api.cl} | 2 +- .../{postgresql-uffi.cl => postgresql-api.cl} | 2 +- interfaces/postgresql/postgresql-sql.cl | 50 +++++++++---------- 8 files changed, 61 insertions(+), 61 deletions(-) rename interfaces/mysql/{mysql-uffi.cl => mysql-api.cl} (99%) rename interfaces/postgresql-socket/{postgresql-socket-uffi.cl => postgresql-socket-api.cl} (99%) rename interfaces/postgresql/{postgresql-uffi.cl => postgresql-api.cl} (98%) diff --git a/clsql-mysql.system b/clsql-mysql.system index 4122b47..795d8d9 100644 --- a/clsql-mysql.system +++ b/clsql-mysql.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql-mysql.system,v 1.1 2002/03/23 14:04:49 kevin Exp $ +;;;; $Id: clsql-mysql.system,v 1.2 2002/03/23 17:10:47 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -28,8 +28,8 @@ :binary-pathname "CLSQL:interfaces;mysql;bin;" :components ((:file "mysql-package") (:file "mysql-loader" :depends-on ("mysql-package")) - (:file "mysql-uffi" :depends-on ("mysql-loader")) - (:file "mysql-sql" :depends-on ("mysql-uffi"))) + (:file "mysql-api" :depends-on ("mysql-loader")) + (:file "mysql-sql" :depends-on ("mysql-api"))) :depends-on (:uffi :clsql) :finally-do (progn diff --git a/clsql-postgresql-socket.system b/clsql-postgresql-socket.system index 98467af..2701c36 100644 --- a/clsql-postgresql-socket.system +++ b/clsql-postgresql-socket.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql-postgresql-socket.system,v 1.1 2002/03/23 14:04:49 kevin Exp $ +;;;; $Id: clsql-postgresql-socket.system,v 1.2 2002/03/23 17:10:47 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -26,8 +26,8 @@ :source-extension "cl" :binary-pathname "CLSQL:interfaces;postgresql-socket;bin;" :components ((:file "postgresql-socket-package") - (:file "postgresql-socket-uffi" + (:file "postgresql-socket-api" :depends-on ("postgresql-socket-package")) (:file "postgresql-socket-sql" - :depends-on ("postgresql-socket-uffi"))) + :depends-on ("postgresql-socket-api"))) :depends-on (:clsql)) diff --git a/clsql-postgresql.system b/clsql-postgresql.system index c956d76..ae3a9a7 100644 --- a/clsql-postgresql.system +++ b/clsql-postgresql.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql-postgresql.system,v 1.1 2002/03/23 14:04:49 kevin Exp $ +;;;; $Id: clsql-postgresql.system,v 1.2 2002/03/23 17:10:47 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -26,6 +26,6 @@ :source-extension "cl" :components ((:file "postgresql-package") (:file "postgresql-loader" :depends-on ("postgresql-package")) - (:file "postgresql-uffi" :depends-on ("postgresql-loader")) - (:file "postgresql-sql" :depends-on ("postgresql-uffi"))) + (:file "postgresql-api" :depends-on ("postgresql-loader")) + (:file "postgresql-sql" :depends-on ("postgresql-api"))) :depends-on (:uffi :clsql)) diff --git a/interfaces/mysql/mysql-uffi.cl b/interfaces/mysql/mysql-api.cl similarity index 99% rename from interfaces/mysql/mysql-uffi.cl rename to interfaces/mysql/mysql-api.cl index db33d9d..2a3b911 100644 --- a/interfaces/mysql/mysql-uffi.cl +++ b/interfaces/mysql/mysql-api.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: mysql-uffi.cl,v 1.1 2002/03/23 14:04:53 kevin Exp $ +;;;; $Id: mysql-api.cl,v 1.1 2002/03/23 17:10:47 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai diff --git a/interfaces/mysql/mysql-sql.cl b/interfaces/mysql/mysql-sql.cl index 20cac08..37b88eb 100644 --- a/interfaces/mysql/mysql-sql.cl +++ b/interfaces/mysql/mysql-sql.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: mysql-sql.cl,v 1.1 2002/03/23 14:04:52 kevin Exp $ +;;;; $Id: mysql-sql.cl,v 1.2 2002/03/23 17:07:40 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -63,29 +63,29 @@ :connection-spec connection-spec :errno (mysql-errno mysql-ptr) :error (mysql-error-string mysql-ptr)) - (uffi:with-cstring (host-native host) - (uffi:with-cstring (user-native user) - (uffi:with-cstring (password-native password) - (uffi:with-cstring (db-native db) - (uffi:with-cstring (socket-native socket) - (let ((error-occurred nil)) - (unwind-protect - (if (uffi:null-pointer-p - (mysql-real-connect - mysql-ptr host-native user-native password-native - db-native 0 socket-native 0)) - (progn - (setq error-occurred t) - (error 'clsql-connect-error - :database-type database-type - :connection-spec connection-spec - :errno (mysql-errno mysql-ptr) - :error (mysql-error-string mysql-ptr))) - (make-instance 'mysql-database - :name (database-name-from-spec connection-spec - database-type) - :mysql-ptr mysql-ptr)) - (when error-occurred (mysql-close mysql-ptr))))))))))))) + (uffi:with-cstrings ((host-native host) + (user-native user) + (password-native password) + (db-native db) + (socket-native socket)) + (let ((error-occurred nil)) + (unwind-protect + (if (uffi:null-pointer-p + (mysql-real-connect + mysql-ptr host-native user-native password-native + db-native 0 socket-native 0)) + (progn + (setq error-occurred t) + (error 'clsql-connect-error + :database-type database-type + :connection-spec connection-spec + :errno (mysql-errno mysql-ptr) + :error (mysql-error-string mysql-ptr))) + (make-instance 'mysql-database + :name (database-name-from-spec connection-spec + database-type) + :mysql-ptr mysql-ptr)) + (when error-occurred (mysql-close mysql-ptr))))))))) (defmethod database-disconnect ((database mysql-database)) diff --git a/interfaces/postgresql-socket/postgresql-socket-uffi.cl b/interfaces/postgresql-socket/postgresql-socket-api.cl similarity index 99% rename from interfaces/postgresql-socket/postgresql-socket-uffi.cl rename to interfaces/postgresql-socket/postgresql-socket-api.cl index 1c643c6..c97eda1 100644 --- a/interfaces/postgresql-socket/postgresql-socket-uffi.cl +++ b/interfaces/postgresql-socket/postgresql-socket-api.cl @@ -9,7 +9,7 @@ ;;;; ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-socket-uffi.cl,v 1.2 2002/03/23 16:42:06 kevin Exp $ +;;;; $Id: postgresql-socket-api.cl,v 1.1 2002/03/23 17:10:48 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai diff --git a/interfaces/postgresql/postgresql-uffi.cl b/interfaces/postgresql/postgresql-api.cl similarity index 98% rename from interfaces/postgresql/postgresql-uffi.cl rename to interfaces/postgresql/postgresql-api.cl index af3a1b0..a29a546 100644 --- a/interfaces/postgresql/postgresql-uffi.cl +++ b/interfaces/postgresql/postgresql-api.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-uffi.cl,v 1.1 2002/03/23 14:04:53 kevin Exp $ +;;;; $Id: postgresql-api.cl,v 1.1 2002/03/23 17:10:48 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai diff --git a/interfaces/postgresql/postgresql-sql.cl b/interfaces/postgresql/postgresql-sql.cl index cb83a34..eca4b29 100644 --- a/interfaces/postgresql/postgresql-sql.cl +++ b/interfaces/postgresql/postgresql-sql.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-sql.cl,v 1.1 2002/03/23 14:04:53 kevin Exp $ +;;;; $Id: postgresql-sql.cl,v 1.2 2002/03/23 17:07:40 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -68,30 +68,30 @@ (host db user password &optional port options tty)) (destructuring-bind (host db user password &optional port options tty) connection-spec - (uffi:with-cstring (host-native host) - (uffi:with-cstring (user-native user) - (uffi:with-cstring (password-native password) - (uffi:with-cstring (db-native db) - (uffi:with-cstring (port-native port) - (uffi:with-cstring (options-native options) - (uffi:with-cstring (tty-native tty) - (let ((connection (PQsetdbLogin host-native port-native - options-native tty-native - db-native user-native - password-native))) - (declare (type pgsql-conn-def connection)) - (when (not (eq (PQstatus connection) - pgsql-conn-status-type#connection-ok)) - (error 'clsql-connect-error - :database-type database-type - :connection-spec connection-spec - :errno (PQstatus connection) - :error (tidy-error-message - (PQerrorMessage connection)))) - (make-instance 'postgresql-database - :name (database-name-from-spec connection-spec - database-type) - :conn-ptr connection))))))))))) + (uffi:with-cstrings ((host-native host) + (user-native user) + (password-native password) + (db-native db) + (port-native port) + (options-native options) + (tty-native tty)) + (let ((connection (PQsetdbLogin host-native port-native + options-native tty-native + db-native user-native + password-native))) + (declare (type pgsql-conn-def connection)) + (when (not (eq (PQstatus connection) + pgsql-conn-status-type#connection-ok)) + (error 'clsql-connect-error + :database-type database-type + :connection-spec connection-spec + :errno (PQstatus connection) + :error (tidy-error-message + (PQerrorMessage connection)))) + (make-instance 'postgresql-database + :name (database-name-from-spec connection-spec + database-type) + :conn-ptr connection))))) (defmethod database-disconnect ((database postgresql-database)) -- 2.34.1