The initialization of the chosen database type is achieved by calling
sql:initialize-database-type
on that database-type. In an application, this step should be done at runtime. It is possible to initialize more than one database type if needed.
The following functions and variables are relevant to initialization:
Specifies the default type of database.
Contains a list of database types which have been initialized by calls to
initialize-database-type
.
sql:initialize-database-type &key
database-type
Initializes a database type according to the value of
database-type
. Adds
database-type
to the list of initialized types.
A sample code sequence for initializing SQL to work with an ODBC database, using the above functions and variables, is as follows:
(require "odbc")
(setf sql:*default-database-type* :odbc)
(sql:initialize-database-type)