(in-package #:cl-user)
(defpackage #:clsql-postgresql
- (:use #:common-lisp #:clsql-base #:postgresql #:clsql-uffi)
+ (:use #:common-lisp #:clsql-sys #:postgresql #:clsql-uffi)
(:export #:postgresql-database)
(:documentation "This is the CLSQL interface to PostgreSQL."))
owner-clause)
database nil nil))))
(if result
- (reverse
- (remove-if #'(lambda (it) (member it '("cmin"
- "cmax"
- "xmax"
- "xmin"
- "oid"
- "ctid"
- ;; kmr -- added tableoid
- "tableoid") :test #'equal))
- result)))))
+ (remove-if #'(lambda (it) (member it '("cmin"
+ "cmax"
+ "xmax"
+ "xmin"
+ "oid"
+ "ctid"
+ ;; kmr -- added tableoid
+ "tableoid") :test #'equal))
+ result))))
(defmethod database-attribute-type (attribute (table string)
(database postgresql-database)
(destructuring-bind (host name user password) connection-spec
(declare (ignore user password))
(multiple-value-bind (output status)
- (clsql-base:command-output "createdb -h~A ~A"
+ (clsql-sys:command-output "createdb -h~A ~A"
(if host host "localhost")
name)
(if (or (not (zerop status))
(destructuring-bind (host name user password) connection-spec
(declare (ignore user password))
(multiple-value-bind (output status)
- (clsql-base:command-output "dropdb -h~A ~A"
+ (clsql-sys:command-output "dropdb -h~A ~A"
(if host host "localhost")
name)
(if (or (not (zerop status))
type)))
(unwind-protect
(progn
- (setf (slot-value database 'clsql-base::state) :open)
+ (setf (slot-value database 'clsql-sys::state) :open)
(mapcar #'car (database-query "select datname from pg_database"
database nil nil)))
(progn
(database-disconnect database)
- (setf (slot-value database 'clsql-base::state) :closed))))))
+ (setf (slot-value database 'clsql-sys::state) :closed))))))
(defmethod database-describe-table ((database postgresql-database) table)
(database-query
(defmethod db-type-default-case ((db-type (eql :postgresql)))
:lower)
-(when (clsql-base:database-type-library-loaded :postgresql)
- (clsql-base:initialize-database-type :database-type :postgresql))
+(when (clsql-sys:database-type-library-loaded :postgresql)
+ (clsql-sys:initialize-database-type :database-type :postgresql))