-(defun test-basic-initialize ()
- (ignore-errors
- (clsql:execute-command "DROP TABLE TYPE_TABLE")
- (clsql:execute-command "DROP TABLE TYPE_BIGINT"))
-
- (clsql:execute-command
- "CREATE TABLE TYPE_TABLE (t_int integer, t_float double precision, t_str VARCHAR(30))")
-
- (if (clsql-sys:db-type-has-bigint? *test-database-type*)
- (clsql:execute-command "CREATE TABLE TYPE_BIGINT (t_int integer, t_bigint BIGINT)")
- (clsql:execute-command "CREATE TABLE TYPE_BIGINT (t_int integer)"))
-
- (dotimes (i 11)
- (let* ((test-int (- i 5))
- (test-flt (transform-float-1 test-int)))
- (clsql:execute-command
- (format nil "INSERT INTO TYPE_TABLE VALUES (~a,~a,'~a')"
- test-int
- (clsql-sys:number-to-sql-string test-flt)
- (clsql-sys:number-to-sql-string test-flt)
- ))
- (when (clsql-sys:db-type-has-bigint? *test-database-type*)
- (clsql:execute-command
- (format nil "INSERT INTO TYPE_BIGINT VALUES (~a,~a)"
- test-int
- (transform-bigint-1 test-int)
- ))))))
+(def-dataset *ds-basic*
+ (:setup (lambda ()
+ (ignore-errors
+ (clsql:execute-command "DROP TABLE TYPE_TABLE")
+ (clsql:execute-command "DROP TABLE TYPE_BIGINT"))
+
+ (clsql:execute-command
+ "CREATE TABLE TYPE_TABLE (t_int integer, t_float double precision, t_str VARCHAR(30))")
+
+ (dotimes (i 11)
+ (let* ((test-int (- i 5))
+ (test-flt (transform-float-1 test-int)))
+ (clsql:execute-command
+ (format nil "INSERT INTO TYPE_TABLE VALUES (~a,~a,'~a')"
+ test-int
+ (clsql-sys:number-to-sql-string test-flt)
+ (clsql-sys:number-to-sql-string test-flt)
+ ))))))
+ (:cleanup "DROP TABLE TYPE_TABLE"))
+
+(def-dataset *ds-bigint*
+ (:setup (lambda ()
+ (ignore-errors (clsql:execute-command "DROP TABLE TYPE_BIGINT"))
+ (clsql:execute-command "CREATE TABLE TYPE_BIGINT (T_INT integer, T_BIGINT BIGINT)")
+ (dotimes (i 11)
+ (clsql:execute-command
+ (format nil "INSERT INTO TYPE_BIGINT VALUES (~a,~a)"
+ (- i 5)
+ (transform-bigint-1 (- i 5)))))))
+ (:cleanup "DROP TABLE TYPE_BIGINT"))