-(deftest :fddl/big/1
- (let ((rows (clsql:select [*] :from [big] :field-names nil)))
- (values
- (length rows)
- (do ((i 0 (1+ i))
- (max (expt 2 60))
- (rest rows (cdr rest)))
- ((= i (length rows)) t)
- (let ((index (1+ i))
- (int (first (car rest)))
- (bigint (second (car rest))))
- (when (and (or (eq *test-database-type* :oracle)
- (and (eq *test-database-type* :odbc)
- (eq *test-database-underlying-type* :postgresql)))
- (stringp bigint))
- (setf bigint (parse-integer bigint)))
- (unless (and (eql int index)
- (eql bigint (truncate max index)))
- (return nil))))))
- 555 t)
-
-(deftest :fddl/owner/1
- (and
- ;; user tables are an improper subset of all tables
- (= (length (intersection (clsql:list-tables :owner nil)
- (clsql:list-tables :owner :all)
- :test #'string=))
- (length (clsql:list-tables :owner nil)))
- ;; user tables are a proper subset of all tables
- (> (length (clsql:list-tables :owner :all))
- (length (clsql:list-tables :owner nil))))
- t)
-
-(deftest :fddl/cache-table-queries/1
- (list
- (gethash "EMPLOYEE" (clsql-sys::attribute-cache clsql:*default-database*))
- (progn
- (clsql:cache-table-queries "EMPLOYEE" :action t)
- (gethash "EMPLOYEE" (clsql-sys::attribute-cache clsql:*default-database*)))
- (progn
- (clsql:list-attribute-types "EMPLOYEE")
- (not
- (null
- (cadr
- (gethash "EMPLOYEE"
- (clsql-sys::attribute-cache clsql:*default-database*))))))
- (progn
- (clsql:cache-table-queries "EMPLOYEE" :action :flush)
- (gethash "EMPLOYEE" (clsql-sys::attribute-cache clsql:*default-database*))))
- (NIL (T NIL) T (T NIL)))
+
+
+(deftest :fddl/owner/1
+ (with-dataset *ds-fddl*
+ (and
+ ;; user tables are an improper subset of all tables
+ (= (length (intersection (clsql:list-tables :owner nil)
+ (clsql:list-tables :owner :all)
+ :test #'string=))
+ (length (clsql:list-tables :owner nil)))
+ ;; user tables are a proper subset of all tables
+ (> (length (clsql:list-tables :owner :all))
+ (length (clsql:list-tables :owner nil)))))
+ t)
+
+(deftest :fddl/cache-table-queries/1
+ (with-dataset *ds-fddl*
+ (list
+ (gethash "ALPHA" (clsql-sys::attribute-cache clsql:*default-database*))
+ (progn
+ (clsql:cache-table-queries "ALPHA" :action t)
+ (gethash "ALPHA" (clsql-sys::attribute-cache clsql:*default-database*)))
+ (progn
+ (clsql:list-attribute-types "ALPHA")
+ (not
+ (null
+ (cadr
+ (gethash "ALPHA"
+ (clsql-sys::attribute-cache clsql:*default-database*))))))
+ (progn
+ (clsql:cache-table-queries "ALPHA" :action :flush)
+ (gethash "ALPHA" (clsql-sys::attribute-cache clsql:*default-database*)))))
+ (nil (t nil) t (t nil)))