r9403: Rework conditions to be CommonSQL backward compatible
[clsql.git] / sql / db-interface.lisp
index 62436309b25e550bf877a09f493c4e65d74bafdc..385e08ba07b7b0811b11f5a29f03f16228b4e040 100644 (file)
@@ -85,7 +85,7 @@ implications, since many databases will require the query to be
 executed in full to answer this question.  If the query produced no
 results then nil is returned for all values that would have been
 returned otherwise.  If an error occurs during query execution, the
-function should signal a clsql-sql-error."))
+function should signal a sql-database-data-error."))
 
 (defgeneric database-dump-result-set (result-set database)
   (:method (result-set (database t))
@@ -158,13 +158,19 @@ if unable to destory."))
   (:documentation "Select the last value in sequence NAME in DATABASE."))
 
 (defgeneric database-start-transaction (database)
-  (:documentation "Start a transaction in DATABASE."))
+  (:documentation "Start a transaction in DATABASE.")
+  (:method ((database t))
+          (signal-no-database-error database)))
 
 (defgeneric database-commit-transaction (database)
-  (:documentation "Commit current transaction in DATABASE."))
+  (:documentation "Commit current transaction in DATABASE.")
+  (:method ((database t))
+          (signal-no-database-error database)))
 
 (defgeneric database-abort-transaction (database)
-  (:documentation "Abort current transaction in DATABASE."))
+  (:documentation "Abort current transaction in DATABASE.")
+  (:method ((database t))
+          (signal-no-database-error database)))
 
 (defgeneric database-get-type-specifier (type args database)
   (:documentation "Return the type SQL type specifier as a string, for
@@ -218,6 +224,13 @@ of TYPE_NAME (keyword) PRECISION SCALE NULLABLE."))
           t)
   (:documentation "T [default] if database-type supports views."))
 
+(defgeneric db-type-has-bigint? (db-type)
+  (:method (db-type)
+          (declare (ignore db-type))
+          ;; SQL92 has bigint
+          t)
+  (:documentation "T [default] if database-type supports bigint."))
+
 (defgeneric db-type-default-case (db-type)
   (:method (db-type)
           (declare (ignore db-type))