r9831: * db-aodbc/aodbc-sql.lisp: Fix storage location
[clsql.git] / sql / db-interface.lisp
index d6b1abe9c61c50a26e274485d3a59e7cebffefb1..cc5328728b1b9da4d1f53961d0a07e0c08e72c3c 100644 (file)
@@ -172,6 +172,10 @@ the given lisp type and parameters."))
 
 (defgeneric database-list-tables (database &key owner)
   (:documentation "List all tables in the given database")
+  (:method ((database database) &key owner)
+          (declare (ignore owner))
+          (warn "database-list-tables not implemented for database type ~A."
+                (database-type database)))
   (:method ((database t) &key owner)
           (declare (ignore owner))
           (signal-no-database-error database)))
@@ -186,24 +190,40 @@ the given lisp type and parameters."))
  
 (defgeneric database-list-views (database &key owner)
   (:documentation "List all views in the DATABASE.")
+  (:method ((database database) &key owner)
+          (declare (ignore owner))
+          (warn "database-list-views not implemented for database type ~A."
+                (database-type database)))
   (:method ((database t) &key owner)
           (declare (ignore owner))
           (signal-no-database-error database)))
 
 (defgeneric database-list-indexes (database &key owner)
   (:documentation "List all indexes in the DATABASE.")
-  (:method ((database t) &key owner)
+  (:method ((database database) &key owner)
           (declare (ignore owner))
-          (signal-no-database-error database)))
+          (warn "database-list-indexes not implemented for database type ~A."
+                (database-type database)))
+  (:method ((database t) &key owner)
+    (declare (ignore owner))
+    (signal-no-database-error database)))
 
 (defgeneric database-list-table-indexes (table database &key owner)
   (:documentation "List all indexes for a table in the DATABASE.")
+  (:method (table (database database) &key owner)
+          (declare (ignore table owner))
+          (warn "database-list-table-indexes not implemented for database type ~A."
+                (database-type database)))
   (:method (table (database t) &key owner) 
           (declare (ignore table owner))
           (signal-no-database-error database)))
 
 (defgeneric database-list-attributes (table database &key owner)
   (:documentation "List all attributes in TABLE.")
+  (:method (table (database database) &key owner)
+          (declare (ignore table owner))
+          (warn "database-list-attributes not implemented for database type ~A."
+                (database-type database)))
   (:method (table (database t) &key owner)
           (declare (ignore table owner))
           (signal-no-database-error database)))
@@ -211,18 +231,30 @@ the given lisp type and parameters."))
 (defgeneric database-attribute-type (attribute table database &key owner)
   (:documentation "Return the type of ATTRIBUTE in TABLE. Returns multiple values
 of TYPE_NAME (keyword) PRECISION SCALE NULLABLE.")
+  (:method (attribute table (database database) &key owner)
+          (declare (ignore attribute table owner))
+          (warn "database-list-attribute-type not implemented for database type ~A."
+                (database-type database)))
   (:method (attribute table (database t) &key owner)
           (declare (ignore attribute table owner))
           (signal-no-database-error database)))
 
 (defgeneric database-add-attribute (table attribute database)
   (:documentation "Add the attribute to the table.")
+  (:method (table attribute (database database))
+          (declare (ignore table attribute))
+          (warn "database-add-attribute not implemented for database type ~A."
+                (database-type database)))
   (:method (table attribute (database t))
           (declare (ignore table attribute))
           (signal-no-database-error database)))
 
 (defgeneric database-rename-attribute (table oldatt newname database)
   (:documentation "Rename the attribute in the table to NEWNAME.")
+  (:method (table oldatt newname (database database))
+          (declare (ignore table oldatt newname))
+          (warn "database-rename-attribute not implemented for database type ~A."
+                (database-type database)))
   (:method (table oldatt newname (database t))
           (declare (ignore table oldatt newname))
           (signal-no-database-error database)))