X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fsyntax.lisp;h=6d771da016dad928c3db849a92f7f637e60f4c84;hb=692ff4990d0cd04685531f524801b16d21cfbb49;hp=371f046614ebe338a2d1325c4760968f184b2835;hpb=9a70270bf9a1d60323ded33ce52bd0904544c70b;p=clsql.git diff --git a/sql/syntax.lisp b/sql/syntax.lisp index 371f046..6d771da 100644 --- a/sql/syntax.lisp +++ b/sql/syntax.lisp @@ -14,7 +14,6 @@ ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* - (in-package #:clsql-sys) (defvar *original-reader-enter* nil) @@ -85,9 +84,13 @@ syntax is disabled." (defun sql-reader-open (stream char) (declare (ignore char)) (let ((sqllist (read-delimited-list #\] stream t))) - (if (sql-operator (car sqllist)) - (cons (sql-operator (car sqllist)) (cdr sqllist)) - (apply #'generate-sql-reference sqllist)))) + (cond ((string= (write-to-string (car sqllist)) "||") + (cons (sql-operator 'concat) (cdr sqllist))) + ((and (= (length sqllist) 1) (eql (car sqllist) '*)) + (apply #'generate-sql-reference sqllist)) + ((sql-operator (car sqllist)) + (cons (sql-operator (car sqllist)) (cdr sqllist))) + (t (apply #'generate-sql-reference sqllist))))) ;; Internal function that disables the close syntax when leaving sql context. (defun disable-sql-close-syntax ()