X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fsql.lisp;h=28be8ef8cbb26343b9bea0bd085e32f5c2263484;hb=5d0dbfd9dd1e08745109a18cce6a04750ffb7477;hp=12535e5fc43d4bc0c87725d752425c8a818e4553;hpb=7d50938ba2db52a713498e49aa1679deae6f0b6b;p=clsql.git diff --git a/sql/sql.lisp b/sql/sql.lisp index 12535e5..28be8ef 100644 --- a/sql/sql.lisp +++ b/sql/sql.lisp @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: sql.lisp,v 1.1 2002/09/30 10:19:23 kevin Exp $ +;;;; $Id: sql.lisp,v 1.4 2002/11/14 18:52: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 @@ -65,8 +65,8 @@ (database-type *default-database-type*) (pool nil)) "Connects to a database of the given database-type, using the type-specific -connection-spec. if-exists is currently ignored. -If pool is t the the connection will be taken from the general pool, +connection-spec. +If pool is t the connection will be taken from the general pool, if pool is a conn-pool object the connection will be taken from this pool. " (if pool @@ -121,6 +121,7 @@ if the database is from a pool it will be released to this pool." ;;; Basic operations on databases +(defgeneric query (expression &key database types)) (defmethod query (query-expression &key (database *default-database*) types) "Execute the SQL query expression query-expression on the given database. @@ -128,7 +129,7 @@ Returns a list of lists of values of the result of that expression." (database-query query-expression database types)) - +(defgeneric execute-command (expression &key database)) (defmethod execute-command (sql-expression &key (database *default-database*)) "Execute the SQL command expression sql-expression on the given database. Returns true on success or nil on failure."