r9457: Reworked CLSQL file structure.
[clsql.git] / sql / generics.lisp
index f4b28483051979d289987550b5452b4b36443c2d..d513bd34c1f27ab526d818279a185b5dc892e582 100644 (file)
 
 (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