INITIALIZE-DATABASE-TYPE — Initializes a database typeFunction
database-type
The database type to initialize, i.e. a keyword symbol denoting a known database back-end. Defaults to the value of *default-database-type*.
Either NIL
if the initialization
attempt fails, or t otherwise.
If the back-end specified by
database-type
has not already been
initialized, as seen from
*initialized-database-types*, an attempt is
made to initialize the database. If this attempt succeeds,
or the back-end has already been initialized, the function
returns t, and places the keyword denoting the database type
onto the list stored in
*initialized-database-types*, if not
already present.
If initialization fails, the function returns
NIL
, and/or signals an error of type
clsql-error. The kind of action
taken depends on the back-end and the cause of the
problem.
*initialized-database-types* => NIL (setf *default-database-type* :mysql) => :MYSQL (initialize-database-type) >> Compiling LAMBDA (#:G897 #:G898 #:G901 #:G902): >> Compiling Top-Level Form: >> => T *initialized-database-types* => (:MYSQL) (initialize-database-type) => T *initialized-database-types* => (:MYSQL)
The database back-end corresponding to the database type
specified is initialized, unless it has already been
initialized. This can involve any number of other side
effects, as determined by the back-end implementation (like
e.g. loading of foreign code, calling of foreign code,
networking operations, etc.). If initialization is
attempted and succeeds, the
database-type
is pushed onto the list
stored in
*initialized-database-types*.