replace numeric constants with oid symbols
[postmodern.git] / cl-postgres.asd
bloba00fd574d6b297428e81c4315836b07db17c721c
1 (defpackage :cl-postgres-system
2   (:use :common-lisp :asdf))
3 (in-package :cl-postgres-system)
5 ;; Change this to enable/disable unicode manually (mind that it won't
6 ;; work unless your implementation supports it).
7 (defparameter *unicode*
8   #+(or sb-unicode unicode ics openmcl-unicode-strings) t
9   #-(or sb-unicode unicode ics openmcl-unicode-strings) nil)
10 (defparameter *string-file* (if *unicode* "strings-utf-8" "strings-ascii"))
12 (defsystem :cl-postgres
13   :description "Low-level client library for PostgreSQL"
14   :depends-on (:md5
15                #-(or sbcl allegro ccl) :usocket
16                #+sbcl                  :sb-bsd-sockets)
17   :components
18   ((:module :cl-postgres
19             :components ((:file "trivial-utf-8")
20                          (:file "ieee-floats")
21                          (:file "package")
22                          (:file "errors" :depends-on ("package"))
23                          (:file "sql-string" :depends-on ("package"))
24                          (:file #.*string-file* :depends-on ("package" "trivial-utf-8"))
25                          (:file "communicate" :depends-on (#.*string-file* "sql-string"))
26                          (:file "messages" :depends-on ("communicate"))
27                          (:file "oid" :depends-on ("package"))
28                          (:file "interpret" :depends-on ("oid" "communicate" "ieee-floats"))
29                          (:file "protocol" :depends-on ("interpret" "messages" "errors"))
30                          (:file "public" :depends-on ("protocol"))
31                          (:file "bulk-copy" :depends-on ("public")))))
32   :in-order-to ((test-op (test-op :cl-postgres-tests)
33                          (test-op :cl-postgres-simple-date-tests))))
35 (defmethod perform :after ((op asdf:load-op) (system (eql (find-system :cl-postgres))))
36   (when (and (find-package :simple-date)
37              (not (find-symbol (symbol-name '#:+postgres-day-offset+) :simple-date)))
38     (asdf:oos 'asdf:load-op :simple-date-postgres-glue)))
40 (defsystem :cl-postgres-tests
41   :depends-on (:cl-postgres :fiveam)
42   :components
43   ((:module :cl-postgres
44             :components ((:file "tests"))))
45   :perform (test-op (o c)
46              (uiop:symbol-call :cl-postgres-tests '#:prompt-connection)
47              (uiop:symbol-call :fiveam '#:run! :cl-postgres)))
49 (defsystem :cl-postgres-simple-date-tests
50   :depends-on (:cl-postgres :cl-postgres-tests :fiveam :simple-date)
51   :components
52   ((:module :cl-postgres
53             :components ((:file "simple-date-tests"))))
54   :perform (test-op (o c)
55              (uiop:symbol-call :cl-postgres-simple-date-tests '#:prompt-connection)
56              (uiop:symbol-call :fiveam '#:run! :cl-postgres-simple-date)))