projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r10860: new pdf
[clsql.git]
/
sql
/
utils.lisp
diff --git
a/sql/utils.lisp
b/sql/utils.lisp
index 362d16c178529ae67659996c181bbe5f2e4aac73..d0402e8954a7fb7b85a96f77887a5f0ad62cdd08 100644
(file)
--- a/
sql/utils.lisp
+++ b/
sql/utils.lisp
@@
-21,7
+21,7
@@
(defun number-to-sql-string (num)
(etypecase num
(integer
(defun number-to-sql-string (num)
(etypecase num
(integer
-
num
)
+
(princ-to-string num)
)
(rational
(float-to-sql-string (coerce num 'double-float)))
(number
(rational
(float-to-sql-string (coerce num 'double-float)))
(number
@@
-52,21
+52,11
@@
(defun sql-escape (identifier)
"Change hyphens to underscores, ensure string"
(defun sql-escape (identifier)
"Change hyphens to underscores, ensure string"
- (let* ((unescaped (etypecase identifier
- (symbol (symbol-name identifier))
- (string identifier)))
- (escaped (make-string (length unescaped))))
+ (let ((unescaped (etypecase identifier
+ (symbol (symbol-name identifier))
+ (string identifier))))
(substitute #\_ #\- unescaped)))
(substitute #\_ #\- unescaped)))
-(dotimes (i (length unescaped))
- (setf (char escaped i)
- (cond ((equal (char unescaped i) #\-)
- #\_)
- ;; ...
- (t
- (char unescaped i)))))
- escaped))
-
(defmacro without-interrupts (&body body)
#+allegro `(mp:without-scheduling ,@body)
#+clisp `(progn ,@body)
(defmacro without-interrupts (&body body)
#+allegro `(mp:without-scheduling ,@body)
#+clisp `(progn ,@body)