projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
made select accept a parameters argument.
[clsql.git]
/
sql
/
expressions.lisp
diff --git
a/sql/expressions.lisp
b/sql/expressions.lisp
index c7236a454f56cb4c4c08a102c4ee61381c162996..c7fd033da646d6c0a17520a64f129f79fb37ad34 100644
(file)
--- a/
sql/expressions.lisp
+++ b/
sql/expressions.lisp
@@
-421,7
+421,7
@@
(defmethod output-sql ((expr sql-query-modifier-exp) database)
(with-slots (modifier components)
expr
(defmethod output-sql ((expr sql-query-modifier-exp) database)
(with-slots (modifier components)
expr
- (
output-sql
modifier database)
+ (
%write-operator
modifier database)
(write-string " " *sql-stream*)
(output-sql (car components) database)
(when components
(write-string " " *sql-stream*)
(output-sql (car components) database)
(when components
@@
-586,10
+586,6
@@
uninclusive, and the args from that keyword to the end."
(when *in-subselect*
(write-string "(" *sql-stream*))
(write-string "SELECT " *sql-stream*)
(when *in-subselect*
(write-string "(" *sql-stream*))
(write-string "SELECT " *sql-stream*)
- (when (and limit (eql :mssql (database-underlying-type database)))
- (write-string " TOP " *sql-stream*)
- (output-sql limit database)
- (write-string " " *sql-stream*))
(when all
(write-string " ALL " *sql-stream*))
(when (and distinct (not all))
(when all
(write-string " ALL " *sql-stream*))
(when (and distinct (not all))
@@
-598,6
+594,10
@@
uninclusive, and the args from that keyword to the end."
(write-string " ON " *sql-stream*)
(output-sql distinct database)
(write-char #\Space *sql-stream*)))
(write-string " ON " *sql-stream*)
(output-sql distinct database)
(write-char #\Space *sql-stream*)))
+ (when (and limit (eql :mssql (database-underlying-type database)))
+ (write-string " TOP " *sql-stream*)
+ (output-sql limit database)
+ (write-string " " *sql-stream*))
(let ((*in-subselect* t))
(output-sql (apply #'vector selections) database))
(when from
(let ((*in-subselect* t))
(output-sql (apply #'vector selections) database))
(when from