Using the new clsql-sys::+whitespace-chars+ param.
authorNathan Bird <nathan@acceleration.net>
Fri, 29 Jan 2010 20:16:55 +0000 (15:16 -0500)
committerNathan Bird <nathan@acceleration.net>
Fri, 29 Jan 2010 20:16:55 +0000 (15:16 -0500)
db-sqlite3/sqlite3-sql.lisp
sql/expressions.lisp

index 1ba6b0ba68649deee35d6a367d1b9bc826095f08..929aeceb92ed1e9011fdc6a4e9d30936442ffd44 100644 (file)
       return
         (let* ((raw-type (third field-info))
                (start-length (position #\( raw-type))
       return
         (let* ((raw-type (third field-info))
                (start-length (position #\( raw-type))
-               (type (string-trim '(#\space #\tab #\newline)
+               (type (string-trim clsql-sys::+whitespace-chars+
                                  (if start-length
                                      (subseq raw-type 0 start-length)
                                      raw-type)))
                                  (if start-length
                                      (subseq raw-type 0 start-length)
                                      raw-type)))
index 770bf379a69c1e74ecd9a51e0204d81107e2e6db..b54029e4b727121c4d299ab888f00cd4f5950eb6 100644 (file)
      ;; the next loop simply emits each sub-expression with the appropriate number of
      ;; parens and operators
      (flet ((trim (sub)
      ;; the next loop simply emits each sub-expression with the appropriate number of
      ;; parens and operators
      (flet ((trim (sub)
-             (string-trim '(#\space #\newline #\return #\tab
-                             ;; sbcl, allegrocl, and clisp use #\no-break_space
-                             ;; lispworks uses #\no-break-space
-                             #-lispworks #\no-break_space
-                             #+lispworks #\no-break-space
-                             )
+             (string-trim +whitespace-chars+
                           (with-output-to-string (*sql-stream*)
                             (output-sql sub database)))))
        (let ((str-subs (loop for sub in sub-expressions
                           (with-output-to-string (*sql-stream*)
                             (output-sql sub database)))))
        (let ((str-subs (loop for sub in sub-expressions