projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r1669: numeric type translation improvements
[clsql.git]
/
sql
/
utils.cl
diff --git
a/sql/utils.cl
b/sql/utils.cl
index d2ff84438bb573255bfe9d5ebb6322dec93ee0b1..aa0aa334042c9484bec0a2fbd89f5a4af630c4a2 100644
(file)
--- a/
sql/utils.cl
+++ b/
sql/utils.cl
@@
-7,7
+7,7
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Mar 2002
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Mar 2002
;;;;
-;;;; $Id: utils.cl,v 1.
1 2002/03/26 14:11:5
9 kevin Exp $
+;;;; $Id: utils.cl,v 1.
2 2002/03/27 05:04:1
9 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
@@
-19,6
+19,14
@@
(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
(in-package :clsql-sys)
(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
(in-package :clsql-sys)
+(defun number-to-sql-string (num)
+ (etypecase num
+ (integer
+ num)
+ (rational
+ (float-to-sql-string (coerce num 'double-float)))
+ (number
+ (float-to-sql-string num))))
(defun float-to-sql-string (num)
"Convert exponent character for SQL"
(defun float-to-sql-string (num)
"Convert exponent character for SQL"