X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fexpressions.lisp;fp=sql%2Fexpressions.lisp;h=4f0baf1230b0ab32353dc69026645306adae11e0;hp=4c57bc3e86f71ae6f97a174587bb93b546a034fb;hb=1c10cdd27e21604ec9a78ac55c9f1e9856bbe99f;hpb=31ca29efddf77e342aa180dfd2d2e292f6055530 diff --git a/sql/expressions.lisp b/sql/expressions.lisp index 4c57bc3..4f0baf1 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -450,8 +450,6 @@ (remove-duplicates tabs :test #'database-identifier-equal)) nil))) - - (defmethod output-sql ((expr sql-value-exp) database) (with-slots (modifier components) expr @@ -1234,3 +1232,16 @@ uninclusive, and the args from that keyword to the end." returns nil if there are no children" (clsql-ors clauses)) + +(defclass sql-escape-string-exp (%sql-expression) + ((string + :initarg :string + :initform nil)) + (:documentation + "An escaped string string expression (postgresql E'stuff') .")) + +(defmethod output-sql ((exp sql-escape-string-exp) database) + (with-slots (string) exp + (when string + (write-char #\E *sql-stream*) + (output-sql string database))))