projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9374: Remove redundant and commonsql incompatible order-by-descending keyword arg...
[clsql.git]
/
sql
/
operations.lisp
diff --git
a/sql/operations.lisp
b/sql/operations.lisp
index bdbb9294ca33500e8583c2904cc84d1aea8c3bcf..bc99d2a136eaf02297f8747a9c8e9eb250178393 100644
(file)
--- a/
sql/operations.lisp
+++ b/
sql/operations.lisp
@@
-37,16
+37,16
@@
(apply #'make-query args))
(defsql sql-any (:symbol "any") (&rest rest)
(apply #'make-query args))
(defsql sql-any (:symbol "any") (&rest rest)
- (make-instance 'sql-
value
-exp
- :
modifier 'any :component
s rest))
+ (make-instance 'sql-
function
-exp
+ :
name 'any :arg
s rest))
(defsql sql-some (:symbol "some") (&rest rest)
(defsql sql-some (:symbol "some") (&rest rest)
- (make-instance 'sql-
value
-exp
- :
modifier 'some :component
s rest))
+ (make-instance 'sql-
function
-exp
+ :
name 'some :arg
s rest))
(defsql sql-all (:symbol "all") (&rest rest)
(defsql sql-all (:symbol "all") (&rest rest)
- (make-instance 'sql-
value
-exp
- :
modifier 'all :component
s rest))
+ (make-instance 'sql-
function
-exp
+ :
name 'all :arg
s rest))
(defsql sql-not (:symbol "not") (&rest rest)
(make-instance 'sql-value-exp
(defsql sql-not (:symbol "not") (&rest rest)
(make-instance 'sql-value-exp
@@
-65,8
+65,8
@@
:operator 'except :sub-expressions rest))
(defsql sql-minus (:symbol "minus") (&rest rest)
:operator 'except :sub-expressions rest))
(defsql sql-minus (:symbol "minus") (&rest rest)
- (make-instance 'sql-
value-exp
- :
modifier 'minus :component
s rest))
+ (make-instance 'sql-
set-exp
+ :
operator 'except :sub-expression
s rest))
(defsql sql-limit (:symbol "limit") (&rest rest)
(make-instance 'sql-query-modifier-exp
(defsql sql-limit (:symbol "limit") (&rest rest)
(make-instance 'sql-query-modifier-exp
@@
-95,8
+95,8
@@
:components '|NOT NULL|))
(defsql sql-exists (:symbol "exists") (&rest rest)
:components '|NOT NULL|))
(defsql sql-exists (:symbol "exists") (&rest rest)
- (make-instance 'sql-
value
-exp
- :
modifier 'exists :component
s rest))
+ (make-instance 'sql-
function
-exp
+ :
name 'exists :arg
s rest))
(defsql sql-* (:symbol "*") (&rest rest)
(if (zerop (length rest))
(defsql sql-* (:symbol "*") (&rest rest)
(if (zerop (length rest))
@@
-137,7
+137,7
@@
(defsql sql-in (:symbol "in") (&rest rest)
(make-instance 'sql-relational-exp
(defsql sql-in (:symbol "in") (&rest rest)
(make-instance 'sql-relational-exp
- :operator 'in :sub-expressions rest))
+
:operator 'in :sub-expressions rest))
(defsql sql-concat (:symbol "concat") (&rest rest)
(make-instance 'sql-relational-exp
(defsql sql-concat (:symbol "concat") (&rest rest)
(make-instance 'sql-relational-exp
@@
-219,3
+219,10
@@
(make-instance 'sql-query-modifier-exp :modifier 'distinct
:components rest))
(make-instance 'sql-query-modifier-exp :modifier 'distinct
:components rest))
+(defsql sql-coalesce (:symbol "coalesce") (&rest rest)
+ (make-instance 'sql-function-exp
+ :name 'coalesce :args rest))
+
+(defsql sql-nvl (:symbol "nvl") (&rest rest)
+ (make-instance 'sql-function-exp
+ :name 'coalesce :args rest))