1 (in-package #:clsql-tests)
3 #.(clsql:locally-enable-sql-reader-syntax)
5 (defparameter artist1 nil)
7 (def-view-class artist ()
8 ((artist_id :accessor artist_id :initarg :id
9 :type integer :db-kind :key :db-constraints (:not-null :auto-increment)
10 :autoincrement-sequence 'artist_artist_id_seq)
11 (name :accessor name :initarg :name :type (varchar 20))))
13 (defun initialize-ds-artists ()
14 ; (start-sql-recording :type :both)
15 ; (let ((*backend-warning-behavior*
16 ; (if (member *test-database-type* '(:postgresql :postgresql-socket))
19 (mapc #'clsql:create-view-from-class
22 (setq *test-start-utime* (get-universal-time))
23 (let* ((*db-auto-sync* nil))
24 (setf artist1 (make-instance 'artist
27 (def-dataset *ds-artists*
28 (:setup initialize-ds-artists)
30 (mapc #'clsql-sys:drop-view-from-class
33 (mapc #'clsql-sys:drop-sequence
34 (list "artist_artist_id_seq"))))))
36 #.(clsql:restore-sql-reader-syntax-state)