Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed prepare-sql.

  • Loading branch information...
commit f7e4e7c59193477de6bc73b6f44384f975718d28 1 parent ab7c90c
@fukamachi authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/driver.lisp
View
15 src/driver.lisp
@@ -98,7 +98,6 @@ This method may be overrided by subclasses."
@export
(defmethod fetch-using-connection ((conn <dbi-connection>) (query <dbi-query>))
- @ignore driver
(error '<dbi-unimplemented-error>
:method-name 'fetch-using-connection))
@@ -171,10 +170,12 @@ For example, in case of MySQL and PostgreSQL, backslashes must be escaped by dou
(if params
(with-output-to-string (out)
(loop for part in sql-parts
- for param in params
- do (write-sequence
- (concatenate 'string
- part
- (param-to-sql param))
- out)))
+ for param = (pop params)
+ do
+ (let ((param (pop params)))
+ (write-sequence
+ (if param
+ (concatenate 'string part "'" param "'")
+ part)
+ out))))
sql)))))
Please sign in to comment.
Something went wrong with that request. Please try again.