projects
/
clsql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
95c3d1b
)
special cased in ODBC limit handling
author
Russ Tyndall
<russ@acceleration.net>
Thu, 20 Aug 2009 18:23:33 +0000
(14:23 -0400)
committer
Russ Tyndall
<russ@acceleration.net>
Thu, 20 Aug 2009 18:23:33 +0000
(14:23 -0400)
sql/expressions.lisp
patch
|
blob
|
history
diff --git
a/sql/expressions.lisp
b/sql/expressions.lisp
index 971609e2e68eee3cc2f171f24800cda10c77d71d..16e967bee67d2a4f07e66f0a22a22955a6b275e0 100644
(file)
--- a/
sql/expressions.lisp
+++ b/
sql/expressions.lisp
@@
-587,6
+587,9
@@
uninclusive, and the args from that keyword to the end."
(write-string "SELECT " *sql-stream*)
(when all
(write-string "ALL " *sql-stream*))
(write-string "SELECT " *sql-stream*)
(when all
(write-string "ALL " *sql-stream*))
+ (when (and limit (eq :odbc (database-type database)))
+ (write-string " TOP " *sql-stream*)
+ (output-sql limit database))
(when (and distinct (not all))
(write-string "DISTINCT " *sql-stream*)
(unless (eql t distinct)
(when (and distinct (not all))
(write-string "DISTINCT " *sql-stream*)
(unless (eql t distinct)
@@
-656,7
+659,7
@@
uninclusive, and the args from that keyword to the end."
(when (cdr order)
(write-char #\, *sql-stream*))))
(output-sql order-by database)))
(when (cdr order)
(write-char #\, *sql-stream*))))
(output-sql order-by database)))
- (when
limit
+ (when
(and limit (not (eq :odbc (database-type database))))
(write-string " LIMIT " *sql-stream*)
(output-sql limit database))
(when offset
(write-string " LIMIT " *sql-stream*)
(output-sql limit database))
(when offset