projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9368: initial port to uffi
[clsql.git]
/
tests
/
test-basic.lisp
diff --git
a/tests/test-basic.lisp
b/tests/test-basic.lisp
index b0f40a5acb24e253e4941bf9daeac9c18ac702f4..598879bd1aca96e01aa2e1eb0b498de7979d0fe1 100644
(file)
--- a/
tests/test-basic.lisp
+++ b/
tests/test-basic.lisp
@@
-3,7
+3,7
@@
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: test-basic.lisp
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: test-basic.lisp
-;;;; Purpose: Tests for clsql
-base
and result types
+;;;; Purpose: Tests for clsql
string-based queries
and result types
;;;; Author: Kevin M. Rosenberg
;;;; Created: Mar 2002
;;;;
;;;; Author: Kevin M. Rosenberg
;;;; Created: Mar 2002
;;;;
@@
-29,9
+29,9
@@
(clsql:execute-command
(format nil "INSERT INTO TYPE_TABLE VALUES (~a,~a,~a,'~a')"
test-int
(clsql:execute-command
(format nil "INSERT INTO TYPE_TABLE VALUES (~a,~a,~a,'~a')"
test-int
- (clsql-
base
:number-to-sql-string test-flt)
+ (clsql-
sys
:number-to-sql-string test-flt)
(transform-bigint-1 test-int)
(transform-bigint-1 test-int)
- (clsql-
base
:number-to-sql-string test-flt)
+ (clsql-
sys
:number-to-sql-string test-flt)
)))))
(defun test-basic-forms ()
)))))
(defun test-basic-forms ()
@@
-47,8
+47,9
@@
(typep float 'double-float)
(if (and (eq :odbc *test-database-type*)
(eq :postgresql *test-database-underlying-type*))
(typep float 'double-float)
(if (and (eq :odbc *test-database-type*)
(eq :postgresql *test-database-underlying-type*))
- ;; ODBC/Postgresql returns bigints as strings
- (stringp bigint)
+ ;; ODBC/Postgresql may return returns bigints as strings or integer
+ ;; depending upon the platform
+ t
(integerp bigint))
(stringp str))
results))))
(integerp bigint))
(stringp str))
results))))
@@
-108,7
+109,7
@@
(deftest :BASIC/MAP/1
(let ((results '())
(deftest :BASIC/MAP/1
(let ((results '())
- (rows (map-query 'vector #'
list
"select * from TYPE_TABLE"
+ (rows (map-query 'vector #'
identity
"select * from TYPE_TABLE"
:result-types nil)))
(declare (type (simple-array list (*)) rows))
(dotimes (i (length rows) results)
:result-types nil)))
(declare (type (simple-array list (*)) rows))
(dotimes (i (length rows) results)
@@
-127,7
+128,7
@@
(deftest :BASIC/MAP/2
(let ((results '())
(deftest :BASIC/MAP/2
(let ((results '())
- (rows (map-query 'list #'
list
"select * from TYPE_TABLE"
+ (rows (map-query 'list #'
identity
"select * from TYPE_TABLE"
:result-types nil)))
(dotimes (i (length rows) results)
(push
:result-types nil)))
(dotimes (i (length rows) results)
(push
@@
-145,7
+146,7
@@
(deftest :BASIC/MAP/3
(let ((results '())
(deftest :BASIC/MAP/3
(let ((results '())
- (rows (map-query 'list #'
list
"select * from TYPE_TABLE"
+ (rows (map-query 'list #'
identity
"select * from TYPE_TABLE"
:result-types :auto)))
(dotimes (i (length rows) results)
(push
:result-types :auto)))
(dotimes (i (length rows) results)
(push