X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fgenerics.lisp;h=d513bd34c1f27ab526d818279a185b5dc892e582;hp=817547d884440e04feb981204a501e5749ef05f3;hb=e622ee6f4bf2b9fe81af59d566e651c983a4833b;hpb=7308bdf188da6424e615ca14096ef53cfb845a90 diff --git a/sql/generics.lisp b/sql/generics.lisp index 817547d..d513bd3 100644 --- a/sql/generics.lisp +++ b/sql/generics.lisp @@ -7,7 +7,7 @@ ;;;; Author: Kevin M. Rosenberg based on ;;;; Created: Apr 2004 ;;;; -;;;; $Id: db-interface.lisp 9123 2004-04-21 20:34:42Z kevin $ +;;;; $Id$ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002-2004 by Kevin M. Rosenberg ;;;; @@ -18,6 +18,38 @@ (in-package #:clsql-sys) + +;; FDML + +(defgeneric execute-command (expression &key database) + (:documentation + "Executes the SQL command EXPRESSION, which may be an SQL +expression or a string representing any SQL statement apart from +a query, on the supplied DATABASE which defaults to +*DEFAULT-DATABASE*.")) + + +(defgeneric query (query-expression &key database result-types flatp field-names) + (:documentation + "Executes the SQL query expression QUERY-EXPRESSION, which may +be an SQL expression or a string, on the supplied DATABASE which +defaults to *DEFAULT-DATABASE*. RESULT-TYPES is a list of symbols +which specifies the lisp type for each field returned by +QUERY-EXPRESSION. If RESULT-TYPES is nil all results are returned +as strings whereas the default value of :auto means that the lisp +types are automatically computed for each field. FIELD-NAMES is t +by default which means that the second value returned is a list +of strings representing the columns selected by +QUERY-EXPRESSION. If FIELD-NAMES is nil, the list of column names +is not returned as a second value. FLATP has a default value of +nil which means that the results are returned as a list of +lists. If FLATP is t and only one result is returned for each +record selected by QUERY-EXPRESSION, the results are returned as +elements of a list.")) + + +;; OODML + (defgeneric update-record-from-slot (object slot &key database) (:documentation "Updates the value stored in the column represented by the