r9457: Reworked CLSQL file structure.
[clsql.git] / sql / generics.lisp
index ac9f0bd2047c4f77c96a8b4611660ff84abaeead..d513bd34c1f27ab526d818279a185b5dc892e582 100644 (file)
@@ -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
 ;;;;
 
 (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
@@ -119,8 +151,8 @@ DATABASE-NULL-VALUE on the type of the slot."))
   )
 (defgeneric get-slot-values-from-view  (obj slotdeflist values)
   )
-(defgeneric database-output-sql-as-type  (type val database)
+(defgeneric database-output-sql-as-type  (type val database db-type)
   )
-(defgeneric read-sql-value  (val type database)
+(defgeneric read-sql-value  (val type database db-type)
   )