Fix whitespace and indentation.

This commit is contained in:
Dimitri Fontaine 2015-02-19 10:30:42 +01:00
parent c38ef4c235
commit 47288d2818

View File

@ -8,9 +8,8 @@
(defun quoted-p (s)
"Return true if s is a double-quoted string"
(and
(eq (char s 0) #\")
(eq (char s (- (length s) 1)) #\")))
(and (eq (char s 0) #\")
(eq (char s (- (length s) 1)) #\")))
(defun apply-identifier-case (identifier)
"Return given IDENTIFIER with CASE handled to be PostgreSQL compatible."
@ -24,9 +23,8 @@
;; SQL identifiers and key words must begin with a letter (a-z, but
;; also letters with diacritical marks and non-Latin letters) or an
;; underscore (_).
(cond
((quoted-p identifier)
:none)
(cond ((quoted-p identifier)
:none)
((cl-ppcre:scan "^[^A-Za-z_]" identifier)
:quote)
@ -44,8 +42,8 @@
(ecase *identifier-case*
(:downcase lowercase-identifier)
(:quote (format nil "\"~a\""
(cl-ppcre:regex-replace-all "\"" identifier "\"\"")))
(:quote (format nil "\"~a\""
(cl-ppcre:regex-replace-all "\"" identifier "\"\"")))
(:none identifier))))
;;;