Common Lisp Package: DBI

README:

FUNCTION

Public

CONNECT (DRIVER-NAME &REST PARAMS &KEY DATABASE-NAME &ALLOW-OTHER-KEYS)

Open a connection to the database which corresponds to `driver-name`.

FIND-DRIVER (DRIVER-NAME)

Find a driver class named as `driver-name`. `driver-name` is a string designer. Driver should be named like '<DBD-SOMETHING>' for a database 'something'.

LIST-ALL-DRIVERS

Return a list of direct subclasses for `<dbi-driver>`.

Private

Undocumented

LOAD-DRIVER (DRIVER-NAME)

MACRO

Public

WITH-TRANSACTION (CONN &BODY BODY)

Start a transaction and commit at the end of this block. If the evaluation `body` is interrupted, the transaction is rolled back automatically.

Undocumented

WITH-CONNECTION ((CONN-SYM &REST REST) &BODY BODY)

GENERIC-FUNCTION

Public

Undocumented

BEGIN-TRANSACTION (CONN)

COMMIT (CONN)

DISCONNECT (CONN)

DO-SQL (CONN SQL &REST PARAMS)

EXECUTE (QUERY &REST PARAMS)

FETCH (QUERY)

FETCH-ALL (QUERY)

PREPARE (CONN SQL &KEY (QUERY-CLASS '<DBI-QUERY>))

ROLLBACK (CONN)

Private

Undocumented

MAKE-CONNECTION (DRIVER)

CONDITION

Public

<DBI-DATA-ERROR>

Exception for errors due to problems with the processed data such as division for zero, numeric value out of range, etc.

<DBI-DATABASE-ERROR>

Exception for errors related to the database.

<DBI-ERROR>

Base class of all other error exceptions. Use this to catch all DBI errors.

<DBI-INTEGRITY-ERROR>

Exception raised when the relational integrity of the database is affected, e.g. a foreign key check fails.

<DBI-INTERFACE-ERROR>

Exception for errors related to the DBI interface rather than the database itself.

<DBI-INTERNAL-ERROR>

Exception raised when the database encounters an internal error, e.g. the cursor is not valid anymore, the transaction is out of sync.

<DBI-NOTSUPPORTED-ERROR>

Exception raised if e.g. commit() is called for a database which do not support transactions.

<DBI-OPERATIONAL-ERROR>

Exception for errors related to the database's operation which are not necessarily under the control of the programmer. This includes such things as unexpected disconnect, datasource name not found, transaction could not be processed, a memory allocation error occured during processing, etc.

<DBI-PROGRAMMING-ERROR>

Exception raised for programming errors, e.g. table not found or already exists, syntax error in SQL statement, wrong number of parameters specified, etc.

<DBI-UNIMPLEMENTED-ERROR>

Exception raised if the DBD driver has not specified a mandatory method.

<DBI-WARNING>

For important warnings like data truncation, etc.