X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Ffunctional.lisp;h=bf38a1219232716d18b90795eec91f89233a3bec;hb=0196e0db0edccccab4cd8a0d6309e768a98667fd;hp=4222f8fbe798fe9b1a41495e48edb364ae97a5a2;hpb=bada52b7a8fd2cc484dee33cccd64ca09a52ec3d;p=clsql.git diff --git a/sql/functional.lisp b/sql/functional.lisp index 4222f8f..bf38a12 100644 --- a/sql/functional.lisp +++ b/sql/functional.lisp @@ -2,7 +2,7 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: functional.cl +;;;; Name: functional.lisp ;;;; Purpose: Functional interface ;;;; Programmer: Pierre R. Mai ;;;; @@ -26,13 +26,16 @@ ;;;; 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;;;; ************************************************************************* -(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) -(in-package :clsql-sys) +(in-package #:clsql-sys) -;;;; This file implements the more advanced functions of the -;;;; functional SQL interface, which are just nicer layers above the -;;;; basic SQL interface. +;;; This file implements the more advanced functions of the +;;; functional SQL interface, which are just nicer layers above the +;;; basic SQL interface. + +;;; With the integration of CLSQL-USQL, these functions are no +;;; longer exported by the CLSQL package since they conflict with names +;;; exported by CLSQL-USQL (defun insert-records (&key into attributes values av-pairs query (database *default-database*)) @@ -84,16 +87,3 @@ where) :database database)))) -(defmacro with-database ((db-var connection-spec &rest connect-args) &body body) - "Evaluate the body in an environment, where `db-var' is bound to the -database connection given by `connection-spec' and `connect-args'. -The connection is automatically closed or released to the pool on exit from the body." - (let ((result (gensym "result-"))) - (unless db-var (setf db-var '*default-database*)) - `(let ((,db-var (connect ,connection-spec ,@connect-args)) - (,result nil)) - (unwind-protect - (let ((,db-var ,db-var)) - (setf ,result (progn ,@body))) - (disconnect :database ,db-var)) - ,result))) \ No newline at end of file