From: Kevin M. Rosenberg Date: Wed, 18 Aug 2004 08:14:01 +0000 (+0000) Subject: r9890: 17 Aug 2004 Kevin Rosenberg X-Git-Tag: v3.8.6~253 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=43cf0db7885a60d71132fe8ede3285c43d961efe r9890: 17 Aug 2004 Kevin Rosenberg * sql/db-interface.lisp: Improve messages when functions are passed a database object, but the method is not specialized for that database type. --- diff --git a/ChangeLog b/ChangeLog index c913238..d4553ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +17 Aug 2004 Kevin Rosenberg + * sql/db-interface.lisp: Improve messages when functions + are passed a database object, but the method is not specialized + for that database type. + 14 Aug 2004 Kevin Rosenberg * TODO: Add bug report about SQL generation with a table containing two join slots. diff --git a/sql/db-interface.lisp b/sql/db-interface.lisp index cc53287..d1466e7 100644 --- a/sql/db-interface.lisp +++ b/sql/db-interface.lisp @@ -56,6 +56,10 @@ was called with the connection-spec.")) (:method (query-expression (database t) result-types field-names) (declare (ignore query-expression result-types field-names)) (signal-no-database-error database)) + (:method (query-expression (database database) result-types field-names) + (declare (ignore query-expression result-types field-names)) + (warn "database-query not implemented for database type ~A." + (database-type database))) (:documentation "Internal generic implementation of query.")) @@ -63,6 +67,10 @@ was called with the connection-spec.")) (:method (sql-expression (database t)) (declare (ignore sql-expression)) (signal-no-database-error database)) + (:method (sql-expression (database database)) + (declare (ignore sql-expression)) + (warn "database-execute-command not implemented for database type ~A." + (database-type database))) (:documentation "Internal generic implementation of execute-command.")) ;;; Mapping and iteration @@ -72,6 +80,11 @@ was called with the connection-spec.")) (declare (ignore query-expression full-set result-types)) (signal-no-database-error database) (values nil nil nil)) + (:method (query-expression (database database) &key full-set result-types) + (declare (ignore query-expression full-set result-types)) + (warn "database-query-result-set not implemented for database type ~A." + (database-type database)) + (values nil nil nil)) (:documentation "Internal generic implementation of query mapping. Starts the query specified by query-expression on the given database and returns @@ -91,12 +104,20 @@ function should signal a sql-database-data-error.")) (:method (result-set (database t)) (declare (ignore result-set)) (signal-no-database-error database)) + (:method (result-set (database database)) + (declare (ignore result-set)) + (warn "database-dump-result-set not implemented for database type ~A." + (database-type database))) (:documentation "Dumps the received result-set.")) (defgeneric database-store-next-row (result-set database list) (:method (result-set (database t) list) (declare (ignore result-set list)) (signal-no-database-error database)) + (:method (result-set (database database) list) + (declare (ignore result-set list)) + (warn "database-store-next-row not implemented for database type ~A." + (database-type database))) (:documentation "Returns t and stores the next row in the result set in list or returns nil when result-set is finished."))