Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Treat the empty keyword as :\|\|

  • Loading branch information...
commit 00f5a21cf3b247668496bea4f4bfa8d22ae570ac 1 parent c4e3368
@marijnh marijnh authored committed
Showing with 10 additions and 0 deletions.
  1. +7 −0 doc/s-sql.html
  2. +3 −0  s-sql/s-sql.lisp
View
7 doc/s-sql.html
@@ -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
3  s-sql/s-sql.lisp
@@ -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"))
Please sign in to comment.
Something went wrong with that request. Please try again.