This is the cl-dbi Reference Manual, version 0.11.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:49:51 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-dbi
Eitaro Fukamachi
BSD 2-Clause
0.11.1
dbi
(system).
dbi
Database independent interface for Common Lisp
Eitaro Fukamachi
BSD 2-Clause
0.11.1
split-sequence
(system).
closer-mop
(system).
cl-ppcre
(system).
bordeaux-threads
(system)., for feature (:or :abcl (:and :allegro :multiprocessing) (:and :clasp :threads) (:and :clisp :mt) (:and :ccl :openmcl-native-threads) (:and :cmu :mp) :corman (:and :ecl :threads) :mkcl :lispworks (:and :sbcl :sb-thread) :scl)
src
(module).
src/utils.lisp
(file).
Modules are listed depth-first from the system components tree.
dbi/src
src/utils.lisp
(file).
dbi
(system).
dbi.lisp
(file).
driver.lisp
(file).
cache
(module).
logger.lisp
(file).
error.lisp
(file).
dbi/src/cache
src
(module).
thread.lisp
(file).
single.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-dbi/cl-dbi.asd
dbi/dbi.asd
dbi/src/dbi.lisp
dbi/src/driver.lisp
dbi/src/cache/thread.lisp
dbi/src/cache/single.lisp
dbi/src/logger.lisp
dbi/src/error.lisp
dbi/src/utils.lisp
dbi/src/dbi.lisp
driver.lisp
(file).
cache
(module).
logger.lisp
(file).
src
(module).
dbi
.
connect
(function).
connect-cached
(function).
disconnect-cached-all
(function).
with-connection
(macro).
*connection-cache-seconds*
(special variable).
*threads-connection-pool*
(special variable).
load-driver
(function).
with-autoload-on-missing
(macro).
dbi/src/driver.lisp
error.lisp
(file).
src
(module).
*row-format*
(special variable).
<dbi-connection>
(class).
<dbi-driver>
(class).
<dbi-query>
(class).
begin-transaction
(generic function).
close-cursor
(generic function).
close-cursor-using-connection
(generic function).
commit
(generic function).
connection-database-name
(reader method).
(setf connection-database-name)
(writer method).
connection-driver-type
(generic function).
connection-established-at
(reader method).
(setf connection-established-at)
(writer method).
connection-handle
(reader method).
(setf connection-handle)
(writer method).
cursor-declared-p
(reader method).
(setf cursor-declared-p)
(writer method).
cursor-formatter
(reader method).
(setf cursor-formatter)
(writer method).
cursor-name
(reader method).
(setf cursor-name)
(writer method).
dbi-connection
(class).
dbi-cursor
(class).
dbi-driver
(class).
dbi-query
(class).
disconnect
(generic function).
do-sql
(generic function).
escape-sql
(generic function).
execute
(generic function).
execute-using-connection
(generic function).
fetch
(generic function).
fetch-all
(generic function).
fetch-using-connection
(generic function).
find-driver
(function).
free-query-resources
(generic function).
in-transaction
(function).
initialize-instance
(method).
list-all-drivers
(function).
make-connection
(generic function).
make-cursor
(generic function).
ping
(generic function).
prepare
(generic function).
prepare-cached
(function).
query-cached-p
(reader method).
(setf query-cached-p)
(writer method).
query-connection
(reader method).
(setf query-connection)
(writer method).
query-fields
(reader method).
(setf query-fields)
(writer method).
query-prepared
(reader method).
(setf query-prepared)
(writer method).
query-results
(reader method).
(setf query-results)
(writer method).
query-row-count
(reader method).
(setf query-row-count)
(writer method).
query-sql
(reader method).
(setf query-sql)
(writer method).
release-savepoint
(generic function).
rollback
(generic function).
rollback-savepoint
(generic function).
row-count
(generic function).
savepoint
(generic function).
with-savepoint
(macro).
with-transaction
(macro).
%with-transaction
(macro).
*transaction-state*
(special variable).
assert-transaction-is-in-progress
(function).
connection-query-cache
(reader method).
(setf connection-query-cache)
(writer method).
dbi-query-base
(class).
finalize-savepoint
(macro).
get-conn
(reader method).
get-identifier
(reader method).
get-state
(reader method).
(setf get-state)
(writer method).
get-transaction-state
(function).
prepare-sql
(generic function).
savepoint-state
(class).
transaction-done-condition
(condition).
transaction-state
(class).
dbi/src/cache/thread.lisp
(:or :abcl (:and :allegro :multiprocessing) (:and :clasp :threads) (:and :clisp :mt) (:and :ccl :openmcl-native-threads) (:and :cmu :mp) :corman (:and :ecl :threads) :mkcl :lispworks (:and :sbcl :sb-thread) :scl)
cache
(module).
cleanup-cache-pool
(function).
get-object
(function).
(setf get-object)
(function).
make-cache-pool
(function).
steal-cache-table
(function).
cache-pool
(structure).
cache-pool-cleanup-fn
(reader).
(setf cache-pool-cleanup-fn)
(writer).
cache-pool-hash
(reader).
(setf cache-pool-hash)
(writer).
cache-pool-lock
(reader).
(setf cache-pool-lock)
(writer).
cache-pool-p
(function).
copy-cache-pool
(function).
make-cache-table
(function).
dbi/src/cache/single.lisp
(:not (:or :abcl (:and :allegro :multiprocessing) (:and :clasp :threads) (:and :clisp :mt) (:and :ccl :openmcl-native-threads) (:and :cmu :mp) :corman (:and :ecl :threads) :mkcl :lispworks (:and :sbcl :sb-thread) :scl))
cache
(module).
dbi/src/logger.lisp
src
(module).
*sql-execution-hooks*
(special variable).
simple-sql-logger
(function).
sql-log
(function).
with-took-usec
(macro).
dbi/src/error.lisp
src
(module).
<dbi-already-commited-error>
(condition).
<dbi-already-rolled-back-error>
(condition).
<dbi-data-error>
(condition).
<dbi-database-error>
(condition).
<dbi-error>
(condition).
<dbi-integrity-error>
(condition).
<dbi-interface-error>
(condition).
<dbi-internal-error>
(condition).
<dbi-notsupported-error>
(condition).
<dbi-operational-error>
(condition).
<dbi-programming-error>
(condition).
<dbi-unimplemented-error>
(condition).
<dbi-warning>
(condition).
database-error-code
(reader method).
database-error-message
(reader method).
dbi-already-commited-error
(condition).
dbi-already-rolled-back-error
(condition).
dbi-data-error
(condition).
dbi-database-error
(condition).
dbi-error
(condition).
dbi-integrity-error
(condition).
dbi-interface-error
(condition).
dbi-internal-error
(condition).
dbi-notsupported-error
(condition).
dbi-operational-error
(condition).
dbi-programming-error
(condition).
dbi-unimplemented-error
(condition).
dbi-warning
(condition).
dbi/src/utils.lisp
dbi
(system).
compile-sql
(function).
defclass/a
(macro).
define-condition/a
(macro).
escape-string
(function).
random-string
(function).
Packages are listed by definition order.
dbi
cl-dbi
common-lisp
.
dbi.cache.thread
.
dbi.driver
.
dbi.error
.
dbi.logger
.
connect
(function).
connect-cached
(function).
disconnect-cached-all
(function).
with-connection
(macro).
*connection-cache-seconds*
(special variable).
*threads-connection-pool*
(special variable).
load-driver
(function).
with-autoload-on-missing
(macro).
dbi.utils
common-lisp
.
compile-sql
(function).
defclass/a
(macro).
define-condition/a
(macro).
escape-string
(function).
random-string
(function).
dbi.cache.thread
dbi.cache
common-lisp
.
dbi
.
cleanup-cache-pool
(function).
get-object
(function).
(setf get-object)
(function).
make-cache-pool
(function).
steal-cache-table
(function).
cache-pool
(structure).
cache-pool-cleanup-fn
(reader).
(setf cache-pool-cleanup-fn)
(writer).
cache-pool-hash
(reader).
(setf cache-pool-hash)
(writer).
cache-pool-lock
(reader).
(setf cache-pool-lock)
(writer).
cache-pool-p
(function).
copy-cache-pool
(function).
make-cache-table
(function).
dbi.driver
common-lisp
.
dbi.utils
.
split-sequence
.
dbi
.
*row-format*
(special variable).
<dbi-connection>
(class).
<dbi-driver>
(class).
<dbi-query>
(class).
begin-transaction
(generic function).
close-cursor
(generic function).
close-cursor-using-connection
(generic function).
commit
(generic function).
connection-database-name
(generic reader).
(setf connection-database-name)
(generic writer).
connection-driver-type
(generic function).
connection-established-at
(generic reader).
(setf connection-established-at)
(generic writer).
connection-handle
(generic reader).
(setf connection-handle)
(generic writer).
cursor-declared-p
(generic reader).
(setf cursor-declared-p)
(generic writer).
cursor-formatter
(generic reader).
(setf cursor-formatter)
(generic writer).
cursor-name
(generic reader).
(setf cursor-name)
(generic writer).
dbi-connection
(class).
dbi-cursor
(class).
dbi-driver
(class).
dbi-query
(class).
disconnect
(generic function).
do-sql
(generic function).
escape-sql
(generic function).
execute
(generic function).
execute-using-connection
(generic function).
fetch
(generic function).
fetch-all
(generic function).
fetch-using-connection
(generic function).
find-driver
(function).
free-query-resources
(generic function).
in-transaction
(function).
list-all-drivers
(function).
make-connection
(generic function).
make-cursor
(generic function).
ping
(generic function).
prepare
(generic function).
prepare-cached
(function).
query-cached-p
(generic reader).
(setf query-cached-p)
(generic writer).
query-connection
(generic reader).
(setf query-connection)
(generic writer).
query-fields
(generic reader).
(setf query-fields)
(generic writer).
query-prepared
(generic reader).
(setf query-prepared)
(generic writer).
query-results
(generic reader).
(setf query-results)
(generic writer).
query-row-count
(generic reader).
(setf query-row-count)
(generic writer).
query-sql
(generic reader).
(setf query-sql)
(generic writer).
release-savepoint
(generic function).
rollback
(generic function).
rollback-savepoint
(generic function).
row-count
(generic function).
savepoint
(generic function).
with-savepoint
(macro).
with-transaction
(macro).
%with-transaction
(macro).
*transaction-state*
(special variable).
assert-transaction-is-in-progress
(function).
connection-query-cache
(generic reader).
(setf connection-query-cache)
(generic writer).
dbi-query-base
(class).
finalize-savepoint
(macro).
get-conn
(generic reader).
get-identifier
(generic reader).
get-state
(generic reader).
(setf get-state)
(generic writer).
get-transaction-state
(function).
prepare-sql
(generic function).
savepoint-state
(class).
transaction-done-condition
(condition).
transaction-state
(class).
dbi.error
common-lisp
.
dbi.utils
.
dbi
.
<dbi-already-commited-error>
(condition).
<dbi-already-rolled-back-error>
(condition).
<dbi-data-error>
(condition).
<dbi-database-error>
(condition).
<dbi-error>
(condition).
<dbi-integrity-error>
(condition).
<dbi-interface-error>
(condition).
<dbi-internal-error>
(condition).
<dbi-notsupported-error>
(condition).
<dbi-operational-error>
(condition).
<dbi-programming-error>
(condition).
<dbi-unimplemented-error>
(condition).
<dbi-warning>
(condition).
database-error-code
(generic reader).
database-error-message
(generic reader).
dbi-already-commited-error
(condition).
dbi-already-rolled-back-error
(condition).
dbi-data-error
(condition).
dbi-database-error
(condition).
dbi-error
(condition).
dbi-integrity-error
(condition).
dbi-interface-error
(condition).
dbi-internal-error
(condition).
dbi-notsupported-error
(condition).
dbi-operational-error
(condition).
dbi-programming-error
(condition).
dbi-unimplemented-error
(condition).
dbi-warning
(condition).
dbi.logger
common-lisp
.
dbi
.
*sql-execution-hooks*
(special variable).
simple-sql-logger
(function).
sql-log
(function).
with-took-usec
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Start a transaction and commit at the end of this block. If the evaluation ‘body‘ is interrupted, the transaction is rolled back automatically.
Open a connection to the database which corresponds to ‘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’.
Returns True if called inside a transaction block.
Return a list of direct subclasses for ‘dbi-driver‘.
Same as PREPARE except reusing the created query object.
Start a transaction.
<dbi-connection>
)) ¶Turn ‘auto-commit‘ off automatically before starting a transaction.
<dbi-connection>
)) ¶dbi-cursor
)) ¶Commit changes and end the current transaction.
<dbi-connection>
)) ¶<dbi-connection>
)) ¶<dbi-connection>
)) ¶automatically generated reader method
<dbi-connection>
)) ¶automatically generated writer method
<dbi-connection>
)) ¶<dbi-connection>
)) ¶automatically generated reader method
<dbi-connection>
)) ¶automatically generated writer method
<dbi-connection>
)) ¶automatically generated reader method
<dbi-connection>
)) ¶automatically generated writer method
dbi-cursor
)) ¶automatically generated reader method
dbi-cursor
)) ¶automatically generated writer method
dbi-cursor
)) ¶automatically generated reader method
dbi-cursor
)) ¶automatically generated writer method
dbi-cursor
)) ¶automatically generated reader method
name
.
dbi-cursor
)) ¶automatically generated writer method
name
.
<dbi-database-error>
)) ¶<dbi-database-error>
)) ¶<dbi-connection>
)) ¶<dbi-connection>
)) ¶Do preparation and execution at once. This method may be overrided by subclasses.
<dbi-connection>
) (sql string
) &optional params) ¶<dbi-connection>
) sql &optional params) ¶Return escaped ‘sql‘.
This method may be overrided by subclasses when needed.
For example, in case of MySQL and PostgreSQL, backslashes must be escaped by doubling it.
<dbi-connection>
) (sql string
)) ¶Execute ‘query‘ with ‘params‘ and return the results.
Execute ‘query‘ in ‘conn‘.
This method must be implemented in each drivers.
<dbi-connection>
) (query <dbi-query>
) params) ¶Fetch the first row from ‘query‘ which is returned by ‘execute‘.
Fetch all rest rows from ‘query‘.
<dbi-query>
) &key format) ¶<dbi-connection>
) (query <dbi-query>
)) ¶Free the resources (e.g. foreign, heap allocated memory)
associated with this query. The default method currently has empty body.
Create a instance of ‘dbi-connection‘ for the ‘driver‘. This method must be implemented in each drivers.
<dbi-driver>
) &key) ¶Check if the database server is still running and the connection to it is still working.
<dbi-connection>
)) ¶<dbi-connection>
) (sql string
) &key query-class) ¶Preparing executing SQL statement and returns a instance of ‘dbi-query‘. This method may be overrided by subclasses.
<dbi-query>
)) ¶automatically generated reader method
<dbi-query>
)) ¶automatically generated writer method
dbi-query-base
)) ¶automatically generated reader method
dbi-query-base
)) ¶automatically generated writer method
dbi-query-base
)) ¶automatically generated reader method
dbi-query-base
)) ¶automatically generated writer method
<dbi-query>
)) ¶automatically generated reader method
<dbi-query>
)) ¶automatically generated writer method
<dbi-query>
)) ¶automatically generated reader method
<dbi-query>
)) ¶automatically generated writer method
<dbi-query>
)) ¶automatically generated reader method
<dbi-query>
)) ¶automatically generated writer method
dbi-query-base
)) ¶automatically generated reader method
sql
.
dbi-query-base
)) ¶automatically generated writer method
sql
.
<dbi-connection>
) &optional identifier) ¶<dbi-connection>
) &optional identifier) ¶Rollback all changes and end the current transaction.
<dbi-connection>
)) ¶<dbi-connection>
)) ¶<dbi-connection>
) &optional identifier) ¶<dbi-connection>
) &optional identifier) ¶Return the number of counts modified by the last executed INSERT/UPDATE/DELETE query.
<dbi-connection>
)) ¶<dbi-connection>
) identifier) ¶dbi-cursor
) &key sql &allow-other-keys) ¶This exception occur when there is a programming error and you are trying to commit a transaction twice.
This exception occur when there is a programming error and you are trying to rollback a transaction twice.
Exception for errors due to problems with the processed
data such as division for zero, numeric value out of range, etc.
Exception for errors related to the database.
Base class of all other error exceptions. Use this to catch all DBI errors.
simple-error
.
Exception raised when the relational integrity of the database is affected, e.g. a foreign key check fails.
Exception for errors related to the DBI interface rather than the database itself.
Exception raised when the database encounters an internal error, e.g. the cursor is not valid anymore, the transaction is out of sync.
Exception raised if e.g. commit() is called for a database which do not support transactions.
:method-name
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.
Exception raised for programming errors, e.g. table not found or already exists, syntax error in SQL statement, wrong number of parameters specified, etc.
Exception raised if the DBD driver has not specified a mandatory method.
:method-name
For important warnings like data truncation, etc.
simple-warning
.
This exception occur when there is a programming error and you are trying to commit a transaction twice.
This exception occur when there is a programming error and you are trying to rollback a transaction twice.
Exception for errors due to problems with the processed
data such as division for zero, numeric value out of range, etc.
Exception for errors related to the database.
Base class of all other error exceptions. Use this to catch all DBI errors.
simple-error
.
Exception raised when the relational integrity of the database is affected, e.g. a foreign key check fails.
Exception for errors related to the DBI interface rather than the database itself.
Exception raised when the database encounters an internal error, e.g. the cursor is not valid anymore, the transaction is out of sync.
Exception raised if e.g. commit() is called for a database which do not support transactions.
:method-name
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.
Exception raised for programming errors, e.g. table not found or already exists, syntax error in SQL statement, wrong number of parameters specified, etc.
Exception raised if the DBD driver has not specified a mandatory method.
:method-name
For important warnings like data truncation, etc.
simple-warning
.
Base class for managing DB connection.
begin-transaction
.
begin-transaction
.
commit
.
commit
.
(setf connection-database-name)
.
connection-database-name
.
connection-driver-type
.
(setf connection-established-at)
.
connection-established-at
.
(setf connection-handle)
.
connection-handle
.
(setf connection-query-cache)
.
connection-query-cache
.
disconnect
.
disconnect
.
do-sql
.
do-sql
.
escape-sql
.
execute-using-connection
.
fetch-using-connection
.
ping
.
prepare
.
prepare-sql
.
release-savepoint
.
release-savepoint
.
rollback
.
rollback
.
rollback-savepoint
.
rollback-savepoint
.
row-count
.
savepoint
.
boolean
t
:auto-commit
:database-name
:handle
(make-hash-table :test (quote equal))
(get-internal-real-time)
:established-at
Base class for DB driver.
Class that represents a prepared DB query.
Base class for managing DB connection.
begin-transaction
.
begin-transaction
.
commit
.
commit
.
(setf connection-database-name)
.
connection-database-name
.
connection-driver-type
.
(setf connection-established-at)
.
connection-established-at
.
(setf connection-handle)
.
connection-handle
.
(setf connection-query-cache)
.
connection-query-cache
.
disconnect
.
disconnect
.
do-sql
.
do-sql
.
escape-sql
.
execute-using-connection
.
fetch-using-connection
.
ping
.
prepare
.
prepare-sql
.
release-savepoint
.
release-savepoint
.
rollback
.
rollback
.
rollback-savepoint
.
rollback-savepoint
.
row-count
.
savepoint
.
boolean
t
:auto-commit
:database-name
:handle
(make-hash-table :test (quote equal))
(get-internal-real-time)
:established-at
Base class for DB driver.
Class that represents a prepared DB query.
A stack of transaction and savepoint states.
hash
.
lock
.
Returns an object representing transaction’s state
if called inside a transaction block or nil otherwise.
<dbi-connection>
)) ¶automatically generated reader method
<dbi-connection>
)) ¶automatically generated writer method
transaction-state
)) ¶automatically generated reader method
conn
.
savepoint-state
)) ¶automatically generated reader method
transaction-state
)) ¶automatically generated reader method
transaction-state
)) ¶automatically generated writer method
Create a function that takes parameters, binds them into a query and returns SQL as a string.
<dbi-connection>
) (sql string
)) ¶condition
.
string
(dbi.utils:random-string "savepoint")
This slot is read-only.
Jump to: | %
(
A B C D E F G I L M P Q R S W |
---|
Jump to: | %
(
A B C D E F G I L M P Q R S W |
---|
Jump to: | %
*
A C D E F H I L M N P Q R S |
---|
Jump to: | %
*
A C D E F H I L M N P Q R S |
---|
Jump to: | <
C D E F L M P S T |
---|
Jump to: | <
C D E F L M P S T |
---|