(defvar *connect-if-exists* :error
"Default value for the if-exists keyword argument in calls to
CONNECT. Meaningful values are :new, :warn-new, :error, :warn-old
and :old.")
(defvar *connect-if-exists* :error
"Default value for the if-exists keyword argument in calls to
CONNECT. Meaningful values are :new, :warn-new, :error, :warn-old
and :old.")
"Connects to a database of the supplied DATABASE-TYPE which
defaults to *DEFAULT-DATABASE-TYPE*, using the type-specific
connection specification CONNECTION-SPEC. The value of IF-EXISTS,
"Connects to a database of the supplied DATABASE-TYPE which
defaults to *DEFAULT-DATABASE-TYPE*, using the type-specific
connection specification CONNECTION-SPEC. The value of IF-EXISTS,
(when make-default (setq *default-database* conn))
conn)
(let* ((db-name (database-name-from-spec connection-spec database-type))
(when make-default (setq *default-database* conn))
conn)
(let* ((db-name (database-name-from-spec connection-spec database-type))
(setf *connected-databases* (delete database *connected-databases*))
(when (eq database *default-database*)
(setf *default-database* (car *connected-databases*)))
(setf *connected-databases* (delete database *connected-databases*))
(when (eq database *default-database*)
(setf *default-database* (car *connected-databases*)))
is called by database backends."
`(handler-case
(destructuring-bind ,template ,connection-spec
is called by database backends."
`(handler-case
(destructuring-bind ,template ,connection-spec
(defun (setf encoding) (encoding db)
(when (typep db 'database)
(setf (slot-value db 'encoding) encoding)
(when (eql (slot-value db 'state) :open)
(defun (setf encoding) (encoding db)
(when (typep db 'database)
(setf (slot-value db 'encoding) encoding)
(when (eql (slot-value db 'state) :open)
;; FIXME: If database object is open then
;; send command to SQL engine specifying the character
;; encoding for the database
;; FIXME: If database object is open then
;; send command to SQL engine specifying the character
;; encoding for the database