;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
;;;; *************************************************************************
-
(in-package #:clsql-sys)
(defvar *original-reader-enter* nil)
(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)))
+ ((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 ()
for the operator."
(typecase operation
(string nil)
- (symbol (gethash (string-upcase (symbol-name operation))
+ (symbol (gethash (symbol-name-default-case (symbol-name operation))
*sql-op-table*))))
(defun sql-operation (operation &rest rest)