Permalink
Browse files

Treat the empty keyword as :\|\|

  • Loading branch information...
1 parent c4e3368 commit 00f5a21cf3b247668496bea4f4bfa8d22ae570ac @marijnh marijnh committed with Nov 21, 2011
Showing with 10 additions and 0 deletions.
  1. +7 −0 doc/s-sql.html
  2. +3 −0 s-sql/s-sql.lisp
View
@@ -259,10 +259,17 @@
<code>:intersect</code>, and <code>:except</code> should be
queries (<code>:select</code> forms).</p>
+
<p class="desc"><code>:array-concat</code> is just an alternative symbol
for <code>:||</code> (in Lisp <code>:||</code> has to be written
as <code>:|\|\||</code>).</p>
+ <p class="desc">Note that you'll have to escape pipe characters to
+ enter them as keywords. S-SQL handles the empty keyword symbol
+ (written <code>:||</code>) specially, and treats it
+ like <code>:\|\|</code>, so that it can be written without
+ escapes. With <code>:\|</code>, this doesn't work.</p>
+
<p class="def"><span>sql-op</span> <a name="unary"></a>:~, :not (arg)</p>
<p class="desc">Unary operators for bitwise and logical
View
@@ -439,6 +439,9 @@ with a given arity."
;; PostGIS operators
(register-sql-operators :2+-ary :&& :&< :|&<\|| :&> :<< :|<<\|| :>> :@ :|\|&>| :|\|>>| :~=)
+(def-sql-op :|| (&rest args)
+ `("(" ,@(sql-expand-list args " || ") ")"))
+
(def-sql-op :desc (arg)
`(,@(sql-expand arg) " DESC"))

0 comments on commit 00f5a21

Please sign in to comment.