generated SQL strings on backend.
* tests/test-fdml.lisp: test for escaping of backslash.
* sql/oodml.lisp: minor tidying in FIND-ALL.
+1 Aug 2004 Marcus Pearce <m.t.pearce@city.ac.uk>
+ * sql/expressions.lisp: conditionalise escaping of backslash in
+ generated SQL strings on backend.
+ * tests/test-fdml.lisp: test for escaping of backslash.
+ * sql/oodml.lisp: minor tidying in FIND-ALL.
+
26 Jul 2004 Kevin Rosenberg <kevin@rosenberg.net>
* NEWS: Initial 3.0 announcement draft
* README: Expand acknowledgements of incorporated projects
23 Jul 2004 Marcus Pearce <m.t.pearce@city.ac.uk>
* sql/oodml.lisp: add DATABASE-OUTPUT-SQL-AS-TYPE method specialisation
to print floats with the exponent markers removed.
- * sql/test-oodml.lisp: add tests for updating records with floats.
+ * tests/test-oodml.lisp: add tests for updating records with floats.
22 Jul 2004 Marcus Pearce <m.t.pearce@city.ac.uk>
* db-oracle/oracle-sql.lisp: enable :OWNER :ALL in DATABASE-LIST-* for
(setf (aref buf j) #\')
(incf j)
(setf (aref buf j) #\'))
- ((char= char #\\)
+ ((and (char= char #\\)
+ ;; MTP: only escape backslash with pgsql/mysql
+ (member (database-underlying-type database)
+ '(:postgresql :mysql)
+ :test #'eq))
(setf (aref buf j) #\\)
(incf j)
(setf (aref buf j) #\\))
View Classes VIEW-CLASSES are passed as arguments to SELECT."
(declare (ignore all set-operation group-by having offset limit inner-join on)
(optimize (debug 3) (speed 1)))
- (labels ((ref-equal (ref1 ref2)
- (equal (sql ref1)
- (sql ref2)))
- (table-sql-expr (table)
- (sql-expression :table (view-table table)))
- (tables-equal (table-a table-b)
- (when (and table-a table-b)
- (string= (string (slot-value table-a 'name))
- (string (slot-value table-b 'name))))))
+ (flet ((ref-equal (ref1 ref2)
+ (string= (sql-output ref1 database)
+ (sql-output ref2 database)))
+ (table-sql-expr (table)
+ (sql-expression :table (view-table table)))
+ (tables-equal (table-a table-b)
+ (when (and table-a table-b)
+ (string= (string (slot-value table-a 'name))
+ (string (slot-value table-b 'name))))))
(remf args :from)
(remf args :where)
(remf args :flatp)
"What's up doc?" "What's up doc?" "What's up doc?" "What's up doc?"
"What's up doc?" "What's up doc?"))
+;; test proper treatment of backslash (depending on backend)
+(deftest :fdml/select/36
+ (clsql:select "foo\\bar\\baz" :from [employee] :flatp t :field-names nil)
+ ("foo\\bar\\baz" "foo\\bar\\baz" "foo\\bar\\baz" "foo\\bar\\baz"
+ "foo\\bar\\baz" "foo\\bar\\baz" "foo\\bar\\baz" "foo\\bar\\baz"
+ "foo\\bar\\baz" "foo\\bar\\baz"))
+
(deftest :fdml/do-query/1
(let ((result '()))
(clsql:do-query ((name) [select [last-name] :from [employee]