From: Kevin M. Rosenberg Date: Fri, 29 Mar 2002 09:37:24 +0000 (+0000) Subject: r1701: *** empty log message *** X-Git-Tag: v3.8.6~1184 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=d68a68290bef7361ab2fc020ce799ff839ebef93 r1701: *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 96be4fc..4ba5547 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ * Separated db-interface and conditions from sql/sql.cl * Improved foreign library loading testing + + * interfaces/postgresql/postgresql-api.cl + Added PQisBusy function + + * Optimizes :types processing if value is nil 27 Mar 2002 Kevin Rosenberg (kevin@rosenberg.net) * interfaces/postgresql-socket/postgresql-socket-api.cl: diff --git a/interfaces/mysql/mysql-sql.cl b/interfaces/mysql/mysql-sql.cl index 2623aed..0d1c05f 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.15 2002/03/27 12:09:39 kevin Exp $ +;;;; $Id: mysql-sql.cl,v 1.16 2002/03/29 09:37:24 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,14 +68,16 @@ (nreverse new-types))) (defun canonicalize-types (types num-fields res-ptr) - (let ((auto-list (make-type-list-for-auto num-fields res-ptr))) - (cond - ((listp types) - (canonicalize-type-list types auto-list)) - ((eq types :auto) - auto-list) - (t - nil)))) + (if (null types) + nil + (let ((auto-list (make-type-list-for-auto num-fields res-ptr))) + (cond + ((listp types) + (canonicalize-type-list types auto-list)) + ((eq types :auto) + auto-list) + (t + nil))))) (defmethod database-initialize-database-type ((database-type (eql :mysql))) t) diff --git a/interfaces/postgresql-socket/postgresql-socket-sql.cl b/interfaces/postgresql-socket/postgresql-socket-sql.cl index 7e79bd1..3a0d491 100644 --- a/interfaces/postgresql-socket/postgresql-socket-sql.cl +++ b/interfaces/postgresql-socket/postgresql-socket-sql.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-socket-sql.cl,v 1.9 2002/03/29 08:28:14 kevin Exp $ +;;;; $Id: postgresql-socket-sql.cl,v 1.10 2002/03/29 09:37:24 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -67,14 +67,16 @@ t)))) (defun canonicalize-types (types cursor) - (let ((auto-list (make-type-list-for-auto cursor))) - (cond - ((listp types) - (canonicalize-type-list types auto-list)) - ((eq types :auto) - auto-list) - (t - nil)))) + (if (null types) + nil + (let ((auto-list (make-type-list-for-auto cursor))) + (cond + ((listp types) + (canonicalize-type-list types auto-list)) + ((eq types :auto) + auto-list) + (t + nil))))) (defun canonicalize-type-list (types auto-list) "Ensure a field type list meets expectations. diff --git a/interfaces/postgresql/postgresql-api.cl b/interfaces/postgresql/postgresql-api.cl index b12de51..83ba307 100644 --- a/interfaces/postgresql/postgresql-api.cl +++ b/interfaces/postgresql/postgresql-api.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-api.cl,v 1.4 2002/03/27 08:09:25 kevin Exp $ +;;;; $Id: postgresql-api.cl,v 1.5 2002/03/29 09:37:24 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -196,3 +196,9 @@ ((res pgsql-result)) :module "postgresql" :returning :void) + +(declaim (inline PQisBusy)) +(uffi:def-function ("PQisBusy" PQisBusy) + ((conn pgsql-conn)) + :module "postgresql" + :returning :int) diff --git a/interfaces/postgresql/postgresql-package.cl b/interfaces/postgresql/postgresql-package.cl index e6845d8..96f0bfb 100644 --- a/interfaces/postgresql/postgresql-package.cl +++ b/interfaces/postgresql/postgresql-package.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-package.cl,v 1.5 2002/03/27 08:09:25 kevin Exp $ +;;;; $Id: postgresql-package.cl,v 1.6 2002/03/29 09:37:24 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -68,6 +68,7 @@ #:PQgetlength #:PQgetisnull #:PQclear + #:PQisBusy ) (:documentation "This is the low-level interface to PostgreSQL.")) diff --git a/interfaces/postgresql/postgresql-sql.cl b/interfaces/postgresql/postgresql-sql.cl index 24def53..275ac39 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.11 2002/03/27 12:09:39 kevin Exp $ +;;;; $Id: postgresql-sql.cl,v 1.12 2002/03/29 09:37:24 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -52,14 +52,16 @@ (nreverse new-types))) (defun canonicalize-types (types num-fields res-ptr) - (let ((auto-list (make-type-list-for-auto num-fields res-ptr))) - (cond - ((listp types) - (canonicalize-type-list types auto-list)) - ((eq types :auto) - auto-list) - (t - nil)))) + (if (null types) + nil + (let ((auto-list (make-type-list-for-auto num-fields res-ptr))) + (cond + ((listp types) + (canonicalize-type-list types auto-list)) + ((eq types :auto) + auto-list) + (t + nil))))) (defun tidy-error-message (message) (unless (stringp message)