+(deftest :ooddl/join/4
+ (with-dataset *ds-employees*
+ (values
+ (length (employee-addresses employee10))
+ ;; add an address
+ (let ((*db-auto-sync* T))
+ (make-instance 'address :addressid 50)
+ (make-instance 'employee-address :emplid 10 :addressid 50)
+ ;; again
+ (length (employee-addresses employee10)))
+ (progn
+ (update-objects-joins (list employee10) :slots '(addresses))
+ (length (employee-addresses employee10)))))
+ 0 0 1)
+
+(deftest :ooddl/big/1
+ ;;tests that we can create-view-from-class with a bigint slot,
+ ;; and stick a value in there.
+ (progn (clsql-sys:create-view-from-class 'big)
+ (values
+ (clsql:table-exists-p [big] )
+ (progn
+ (clsql:drop-table [big] :if-does-not-exist :ignore)
+ (clsql:table-exists-p [big] )))
+ )
+ t nil)
+
+(deftest :ooddl/big/2
+ (with-dataset *ds-big*
+ (let ((rows (clsql:select [*] :from [big] :order-by [i] :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)
+