30 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net)
- * Version 2.10.0: New API function: CACHE-TABLE-QUERIES.
+ * Version 2.10.2
+ * base/basic-sql.lisp: Set default value of :result-types
+ to :auto for more CommonSQL conformance.
+ * test/test-fdml.lisp: Add tests for numeric value of fields
+
+
+30 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net)
+ * Version 2.10.1: New API function: CACHE-TABLE-QUERIES.
* base/basic-sql.lisp, db-*/*-sql.lisp: More CommonSQL conformance.
Return field names as second value for QUERY. This can be overridden
for efficiency with the new keyword :FIELD-NAMES set to NIL
QUERY
o should coerce values returned as strings to appropriate lisp type
- (except for SQLite interface, this works when :result-types is :auto).
- Perhaps that should be the default?
+ for SQLite backend
>> The object-oriented sql interface
that expression and a list of field names selected in sql-exp."))
(defmethod query ((query-expression string) &key (database *default-database*)
- (result-types nil) (flatp nil) (field-names t))
+ (result-types :auto) (flatp nil) (field-names t))
(record-sql-action query-expression :query database)
(multiple-value-bind (rows names) (database-query query-expression database result-types
field-names)
-cl-sql (2.10.1-1) unstable; urgency=low
+cl-sql (2.10.2-1) unstable; urgency=low
* New upstream
(("Vladamir" "Lenin" "lenin@soviet.org")))
+;; Computed values are not always classified as numeric by psqlodbc
(deftest :fdml/query/1
- (clsql:query "SELECT COUNT(*) FROM EMPLOYEE WHERE (EMAIL LIKE '%org')" :field-names nil)
- (("10")))
+ (let ((count (caar (clsql:query "SELECT COUNT(*) FROM EMPLOYEE WHERE (EMAIL LIKE '%org')" :field-names nil))))
+ (if (stringp count)
+ (nth-value 0 (parse-integer count))
+ count))
+ 10)
(deftest :fdml/query/2
(multiple-value-bind (rows field-names)
("Josef" "Stalin") ("Leon" "Trotsky"))
("FIRST_NAME" "LAST_NAME"))
+(deftest :fdml/query/3
+ (caar (clsql:query "SELECT EMPLID FROM EMPLOYEE WHERE LAST_NAME = 'Andropov'" :field-names nil))
+ 6)
+
+(deftest :fdml/query/4
+ (typep (caar (clsql:query "SELECT HEIGHT FROM EMPLOYEE WHERE LAST_NAME = 'Andropov'" :field-names nil))
+ 'float)
+ t)
(deftest :fdml/execute-command/1
(values