The cl-dbi-connection-pool Reference Manual

This is the cl-dbi-connection-pool Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 11:46:31 2026 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-dbi-connection-pool

Author

tamura shingo

License

LLGPL

Version

0.1

Dependency

dbi-cp (system).

Source

cl-dbi-connection-pool.asd.


2.2 dbi-cp

connection pool for CL-DBI

Author

tamura shingo

License

LLGPL

Long Description

# CL-DBI-Connection-Pool - connection pool for CL-DBI

![ci workflow](https://github.com/tamurashingo/cl-dbi-connection-pool/actions/workflows/ci.yml/badge.svg)

This library provides connection pool for CL-DBI.

## Usage

### Create connection pool

make connection pool.

“‘common-lisp
(dbi-cp:make-db-connection-pool driver-name &key database-name username password (initial-size 10) (max-size 10) (checkout-timeout 30) (idle-timeout 600) (max-lifetime 1800) (keepalive-interval 0) validation-query (reaper-interval 60)) ;; => dbi-cp:<dbi-connection-pool> “‘

- driver-name
- ‘:sqlite‘, ‘:mysql‘, ‘:postgresql‘ (same as ‘CL-DBI‘)
- database-name
- database name (same as ‘CL-DBI‘)
- username
- username (same as ‘CL-DBI‘)
- password
- password (same as ‘CL-DBI‘)
- initial-size
- initial number of connections that are created when the pool is started
- max-size
- maximum number of connections
- checkout-timeout
- maximum wait time (in seconds) when acquiring a connection from the pool (default: 30 seconds)
- idle-timeout
- time in seconds after which idle connections are removed from the pool (default: 600 seconds)
- max-lifetime
- maximum lifetime in seconds for a connection since creation (default: 1800 seconds, NIL to disable)
- keepalive-interval
- interval in seconds for checking connection validity (default: 0 to disable, recommended: 600 seconds)
- validation-query
- query used to validate connection (e.g., "SELECT 1") (default: automatically set based on database type)
- reaper-interval
- interval in seconds between reaper thread executions (default: 60 seconds, usually no need to change)

Additionally, it accepts parameters used in cl-dbi.

“‘common-lisp
;;; Basic usage example
(defparameter *CONNECTION-POOL*
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "dbi-cp"
:username "root"
:password "password"))

;;; Advanced connection pool configuration example
(defparameter *POOL-WITH-OPTIONS*
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "production"
:username "app_user"
:password "password"
:initial-size 5
:max-size 20
:checkout-timeout 30 ; wait up to 30 seconds
:idle-timeout 600 ; remove idle connections after 10 minutes
:max-lifetime 1800 ; recreate connections after 30 minutes
:keepalive-interval 600 ; check validity every 10 minutes
:validation-query "SELECT 1")) ; validation query
“‘

### Get connection

get database connection from connection pool.

“‘common-lisp
(dbi-cp:get-connection connection-pool) ;; => dbi-cp.proxy:<dbi-connection-proxy>
“‘

- connection-pool (dbi-cp:&lt;dbi-connection-pool&gt;)
- connection pool

“‘common-lisp
(setf conn (dbi-cp:get-connection *CONNECTION-POOL*))
“‘

### prepare, execute, fetch ...

#### Prepare

prepare SQL statement.

“‘common-lisp
(dbi-cp:prepare connection sql) ;; => dbi.driver:<dbi-query>
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection
- sql
- SQL statement

this function is based on ‘CL-DBI‘

#### Execute

execute SQL.

“‘common-lisp
(dbi-cp:execute query &optional params) ;; => dbi.driver:<dbi-query>
“‘

- query (dbi.driver:&lt;dbi-query&gt;)
- precompiled query (returned by ‘prepare‘)
- params
- SQL parameters

this function is based on ‘CL-DBI‘

#### Fetch

fetch first row from ‘query‘ which is returned by ‘execute‘.

“‘common-lisp
(dbi-cp:fetch query) ;; => result
“‘

- query (dbi.driver:&lt;dbi-query&gt;)
- returned by ‘execute‘

this function is based on ‘CL-DBI‘

### Fetch all

fetch all ret row from ‘query‘.

“‘common-lisp
(dbi-cp:fetch-all query) ;; => result
“‘

- query (dbi.driver:&lt;dbi-query&gt;)
- returned by ‘execute‘

this function is based on ‘CL-DBI‘

#### row count

return the number of counts modified by last execute INSERT/UPDATE/DELETE query.

“‘common-lisp
(dbi-cp:row-count connection) ;; => number
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection

this function is based on ‘CL-DBI‘

#### do sql

do preparation and execution at once for INSERT, UPDATE, DELETE or DDL.

“‘common-lisp
(dbi-cp:do-sql connection sql &optional params)
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection
- sql
- SQL statement
- params
- SQL parameters

this function is based on ‘CL-DBI‘

### Release connection

Return the connection to the pool. The connection is not closed but returned to the pool for reuse.

“‘common-lisp
(dbi-cp:disconnect connection)
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection

### Shutdown connection pool

Close all connections and stop the connection pool. Also stops the background reaper thread.

“‘common-lisp
(dbi-cp:shutdown pool)
“‘

- pool (dbi-cp:&lt;dbi-connection-pool&gt;)
- connection pool

### Transaction

#### create transaction block

start a transaction and commit at the end of this block.
if the evaluation ‘body‘ is interrupted, the transaction is rolled back automatically.

“‘common-lisp
(dbi-cp:with-transaction connection &body body)
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection
- body
- body

this function is based on ‘CL-DBI‘

#### commit

Within ‘with-transaction‘, you can use ‘commit‘.
Outside of ‘with-transaction‘, ‘commit‘ does nothing.

“‘common-lisp
(dbi-cp:commit connection)
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection

this function is based on ‘CL-DBI‘

#### rollback

Like ‘commit‘, ‘rollback‘ is also executed within ‘with-transaction‘.

“‘common-lisp
(dbi-cp:rollback connection)
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection

this function is based on ‘CL-DBI‘

#### savepoint

set a named transaction savepoint with a name of ‘identifier‘.

“‘common-lisp
(dbi-cp:savepoint connection identifier)
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection
- identifier
- name of transaction savepoint

this function is based on ‘CL-DBI‘

#### rollback savepoint

rollback a transaction to the named savepoint.

“‘common-lisp
(dbi-cp:rollback-savepoint connection &optional identifier)
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection
- identifier
- name of transaction savepoint

this function is based on ‘CL-DBI‘

#### release savepoint

remove the named savepoint. no commit or rollback occurs.

“‘common-lisp
(dbi-cp:release-savepoint connection &optional identifier)
“‘

- connection (dbi-cp.proxy:&lt;dbi-connection-proxy&gt;)
- database connection
- identifier
- name of transaction savepoint

this function is based on ‘CL-DBI‘

## Advanced Connection Pool Features

For production use, the following advanced connection management features are provided.

### checkout-timeout (Connection Acquisition Timeout)

Set the wait time when acquiring a connection from the pool.

- **Default**: 30 seconds
- **Effect**: If all connections are in use, wait for the specified time and retry
- **Purpose**: Prevent errors during temporary high load

“‘common-lisp
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:checkout-timeout 30) ; wait up to 30 seconds
“‘

### idle-timeout (Idle Timeout)

Automatically remove unused connections from the pool.

- **Default**: 600 seconds (10 minutes)
- **Effect**: Remove connections that have not been used for the specified time, shrink to ‘:initial-size‘
- **Purpose**: Resource efficiency during low load

“‘common-lisp
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:initial-size 5
:max-size 20
:idle-timeout 600) ; remove after 10 minutes of inactivity
“‘

### max-lifetime (Maximum Lifetime)

Manage the elapsed time since connection creation and automatically recreate old connections.

- **Default**: 1800 seconds (30 minutes)
- **Effect**: Recreate connections after the specified time has elapsed
- **Purpose**: Handle database-side timeouts, improve stability of long-running applications

“‘common-lisp
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:max-lifetime 1800) ; recreate after 30 minutes

;; If MySQL wait_timeout is 8 hours
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:max-lifetime 28740) ; 8 hours - 60 seconds
“‘

**Recommended setting**: Set slightly shorter than the database’s ‘wait_timeout‘

### keepalive-interval (Keepalive Interval)

Periodically check connection validity and detect/recreate invalid connections.

- **Default**: 0 (disabled)
- **Recommended**: 600 seconds (10 minutes)
- **Effect**: Check connection validity at specified intervals and recreate if invalid
- **Purpose**: Detect silent disconnections, detect database-side timeouts

“‘common-lisp
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:keepalive-interval 600 ; check every 10 minutes
:validation-query "SELECT 1")
“‘

**Note**: ‘validation-query‘ must be set to enable ‘keepalive-interval‘.

### validation-query (Validation Query)

Set the SQL query to check connection validity.

- **Default**: Automatically set based on database type (MySQL/PostgreSQL/SQLite3: "SELECT 1")
- **Effect**: Execute this query during keepalive checks to validate the connection
- **Purpose**: Validate connection validity, use with keepalive

“‘common-lisp
;; Use default value (recommended)
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password")

;; Specify custom query
(dbi-cp:make-dbi-connection-pool :postgres
:database-name "test"
:username "postgres"
:password "password"
:validation-query "SELECT 1")

;; Application-specific validation
(dbi-cp:make-dbi-connection-pool :postgres
:database-name "myapp"
:username "appuser"
:password "password"
:validation-query "SELECT 1 FROM users LIMIT 1")
“‘

**Best practices**:
- Use lightweight queries (‘SELECT 1‘ recommended)
- Use queries without side effects (no INSERT/UPDATE/DELETE)
- Use queries that execute quickly

### reaper-interval (Reaper Thread Execution Interval)

Set the execution interval of the reaper thread that runs in the background.

- **Default**: 60 seconds
- **Effect**: Control the reaper thread execution interval
- **Purpose**: Usually no need to change, for advanced tuning

The reaper thread is responsible for:
1. Removing idle connections based on ‘idle-timeout‘
2. Recreating old connections based on ‘max-lifetime‘
3. Checking connection validity based on ‘keepalive-interval‘

“‘common-lisp
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:reaper-interval 60) ; execute every 60 seconds (default)
“‘

**Note**:
- Setting this value too small consumes system resources
- Setting it too large delays the response of idle-timeout and max-lifetime
- The default value (60 seconds) is usually sufficient

### MySQL-Specific Features

When using the MySQL driver, the following automatic adjustment features are enabled:

#### Automatic Retrieval of max_allowed_packet

Automatically retrieve the MySQL server’s ‘max_allowed_packet‘ setting, which can be referenced when executing large queries.

#### Automatic Adjustment of max-lifetime Based on wait_timeout

Automatically retrieve the MySQL server’s ‘wait_timeout‘ setting and check if ‘max-lifetime‘ is appropriately configured. If ‘max-lifetime‘ is longer than ‘wait_timeout‘, a warning is displayed.

“‘common-lisp
;; If MySQL wait_timeout is 28800 seconds (8 hours)
;; It is recommended to set max-lifetime shorter than wait_timeout
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:max-lifetime 28740) ; 8 hours - 60 seconds
“‘

This feature allows the application to automatically recreate connections before they timeout on the database side.

### Recommended Configuration

Recommended configuration for production environments:

“‘common-lisp
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "production"
:username "app_user"
:password "password"
:initial-size 5 ; minimum number of connections
:max-size 20 ; maximum number of connections
:checkout-timeout 30 ; wait 30 seconds
:idle-timeout 600 ; remove idle connections after 10 minutes
:max-lifetime 1800 ; recreate connections after 30 minutes
:keepalive-interval 600 ; check validity every 10 minutes
:validation-query "SELECT 1") ; validation query
“‘

### Compatibility with Other Frameworks

These parameters are compatible with standard parameters from the following frameworks:

- **Spring Boot (HikariCP)**: ‘connection-timeout‘, ‘idle-timeout‘, ‘max-lifetime‘, ‘keepalive-time‘, ‘connection-test-query‘
- **Rails (ActiveRecord)**: ‘checkout_timeout‘, ‘idle_timeout‘, ‘keepalive‘

### Important Notes

#### Relationship between keepalive-interval and validation-query

When enabling ‘keepalive-interval‘ (setting a value greater than 0), **you must set ‘validation-query‘**. If ‘validation-query‘ is not set, keepalive checks will not be executed and a warning message will be displayed.

“‘common-lisp
;; ❌ Incorrect example: only setting keepalive-interval
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:keepalive-interval 600) ; warning will be displayed

;; ✓ Correct example: also setting validation-query
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:keepalive-interval 600
:validation-query "SELECT 1") ; works correctly
“‘

#### Recommended Parameter Settings

The following relationships exist between parameters:

1. **keepalive-interval < max-lifetime** is recommended
- Periodically check with keepalive, finally reset with max-lifetime
- Example: ‘keepalive-interval=600‘, ‘max-lifetime=1800‘

2. **max-lifetime < database wait_timeout** is recommended
- Recreate on the application side before timing out on the database side
- Example (when MySQL wait_timeout=28800): ‘max-lifetime=28740‘

3. **reaper-interval usually uses the default value**
- 60 seconds is sufficient unless there is a special reason

## Example

“‘common-lisp
;;;
;;; create connection pool
;;;
CL-USER> (defparameter *pool*
(dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"))
*POOL*

;;;
;;; get database connection
;;;
CL-USER> (defparameter connection (dbi-cp:get-connection *pool*))
CONNECTION
CL-USER> connection
#<DBI-CP.PROXY:<DBI-CONNECTION-PROXY> {1002E23973}>

;;;
;;; execute DDL
;;;
CL-USER> (dbi-cp:do-sql connection "create table person (id integer primary key, name varchar(24) not null)")
; No value

;;;
;;; select
;;;
CL-USER> (let* ((query (dbi-cp:prepare connection "select count(*) from person"))
(result (dbi-cp:execute query)))
(format T "~A" (dbi-cp:fetch result)))
(count(*) 0)
NIL

;;;
;;; insert
;;;
CL-USER> (dbi-cp:with-transaction connection
(let* ((query (dbi-cp:prepare connection "insert into person (id, name) values (?, ?)")))
(dbi-cp:execute query (list 1 "user1"))
(dbi-cp:execute query (list 2 "user2"))
(dbi-cp:execute query (list 3 "user3"))))
#<DBD.MYSQL:<DBD-MYSQL-QUERY> {1004B671F3}>

;;;
;;; select
;;;
CL-USER> (let* ((query (dbi-cp:prepare connection "select * from person"))
(result (dbi-cp:execute query)))
(dbi-cp:fetch-all result))
((:|id| 1 :|name| "user1") (:|id| 2 :|name| "user2") (:|id| 3 :|name| "user3"))

;;;
;;; rollback
;;;
CL-USER> (dbi-cp:with-transaction connection
(dbi-cp:execute (dbi-cp:prepare connection "delete from person"))
(rollback connection))
0
CL-USER> (dbi-cp:rollback connection)
; No value
CL-USER> (let* ((query (dbi-cp:prepare connection "select count(*) from person"))
(result (dbi-cp:execute query)))
(format T "~A" (dbi-cp:fetch result)))
(count(*) 3)
NIL

;;;
;;; release connection
;;;
CL-USER> (dbi-cp:disconnect connection)
NIL

;;;
;;; shutdown connection pool
;;;
CL-USER> (dbi-cp:shutdown *pool*)
NIL
“‘

## Installation

This library is available on Quicklisp.

“‘commonlisp
(ql:quickload :cl-dbi-connection-pool)
“‘

## how to develop

require

- make
- docker

### test

#### prepare

To prepare, create a docker image for testing.

“‘sh
make setup
“‘

#### run test

“‘sh
make test
“‘

#### swank server

Start the swank server.

“‘sh
make test.swank
“‘

connect with SLIME.

“‘
M-x slime-connect 127.0.0.1 4005
“‘

create connection pool

“‘common-lisp
(ql:quickload :cl-dbi-connection-pool)

(defvar *pool-sqlite3* (dbi-cp:make-dbi-connection-pool :sqlite3
:database-name "/app/volumes/sqlite3-test.db"))

(defvar *pool-mysql* (dbi-cp:make-dbi-connection-pool :mysql
:database-name "test"
:username "root"
:password "password"
:host "mysql-test"
:port 3306))

(defvar *pool-postgres* (dbi-cp:make-dbi-connection-pool :postgres
:database-name "test"
:username "dbicp"
:password "password"
:host "postgresql-test"
:port 5432))
“‘

#### stop test containers

“‘sh
make test.down
“‘

## Author

* tamura shingo (tamura.shingo@gmail.com)

## Copyright

Copyright (c) 2017 tamura shingo (tamura.shingo@gmail.com)

## License

Licensed under the LLGPL License.

Version

0.2.0

Dependencies
  • cl-syntax (system).
  • cl-syntax-annot (system).
  • cl-dbi (system).
  • bt-semaphore (system).
  • babel (system).
Source

dbi-cp.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 dbi-cp/src

Source

dbi-cp.asd.

Parent Component

dbi-cp (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 cl-dbi-connection-pool/cl-dbi-connection-pool.asd

Source

cl-dbi-connection-pool.asd.

Parent Component

cl-dbi-connection-pool (system).

ASDF Systems

cl-dbi-connection-pool.

Packages

cl-dbi-connection-pool-asd.


4.1.2 dbi-cp/dbi-cp.asd

Source

dbi-cp.asd.

Parent Component

dbi-cp (system).

ASDF Systems

dbi-cp.

Packages

dbi-cp-asd.


4.1.3 dbi-cp/src/dbi-cp.lisp

Dependency

connectionpool.lisp (file).

Source

dbi-cp.asd.

Parent Component

src (module).

Packages

dbi-cp.

Internals

show-connection-pool (function).


4.1.4 dbi-cp/src/connectionpool.lisp

Dependencies
Source

dbi-cp.asd.

Parent Component

src (module).

Packages

dbi-cp.connectionpool.

Public Interface
Internals

4.1.5 dbi-cp/src/proxy.lisp

Source

dbi-cp.asd.

Parent Component

src (module).

Packages

dbi-cp.proxy.

Public Interface
Internals

4.1.6 dbi-cp/src/error.lisp

Source

dbi-cp.asd.

Parent Component

src (module).

Packages

dbi-cp.error.

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 dbi-cp.connectionpool

Source

connectionpool.lisp.

Use List

common-lisp.

Public Interface
Internals

5.2 dbi-cp-asd

Source

dbi-cp.asd.

Use List
  • asdf/interface.
  • common-lisp.

5.3 dbi-cp.error

Source

error.lisp.

Use List

common-lisp.

Public Interface
Internals

5.4 dbi-cp

Source

dbi-cp.lisp.

Nickname

cl-dbi-connection-pool

Use List

common-lisp.

Internals

show-connection-pool (function).


5.5 dbi-cp.proxy

Source

proxy.lisp.

Use List
  • cl-annot.
  • cl-annot.class.
  • common-lisp.
Public Interface
Internals

5.6 cl-dbi-connection-pool-asd

Source

cl-dbi-connection-pool.asd.

Use List
  • asdf/interface.
  • common-lisp.

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Macros

Macro: with-transaction (conn &body body)
Package

dbi-cp.proxy.

Source

proxy.lisp.


6.1.2 Ordinary functions

Function: check-packet-size (conn sql &optional params)

Check if the query size is within max_allowed_packet limit.
Returns T if within limit, NIL if exceeds limit or limit is not available.

Package

dbi-cp.proxy.

Source

proxy.lisp.

Function: get-max-allowed-packet (conn)

Get the MySQL max_allowed_packet value in bytes.
Returns NIL for non-MySQL connections or if the value is not available.

Package

dbi-cp.proxy.

Source

proxy.lisp.

Function: make-dbi-connection-pool (driver-name &rest params &key database-name username password initial-size max-size checkout-timeout idle-timeout max-lifetime keepalive-interval validation-query reaper-interval &allow-other-keys)

make connection pool

Example
(make-dbi-connection-pool :mysql :database-name "dbicp" :username "root" :password "password")

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: packet-size-exceeded-p (conn sql &optional params)

Check if the query size exceeds max_allowed_packet limit. Returns T if exceeds, NIL otherwise.

Package

dbi-cp.proxy.

Source

proxy.lisp.


6.1.3 Generic functions

Generic Reader: connection-pool (object)
Generic Writer: (setf connection-pool) (object)
Package

dbi-cp.proxy.

Methods
Reader Method: connection-pool ((<dbi-connection-proxy> <dbi-connection-proxy>))
Writer Method: (setf connection-pool) ((<dbi-connection-proxy> <dbi-connection-proxy>))

Reference to the parent connection pool

Source

proxy.lisp.

Target Slot

connection-pool.

Generic Reader: dbi-connection (object)
Package

dbi-cp.proxy.

Methods
Reader Method: dbi-connection ((<dbi-connection-proxy> <dbi-connection-proxy>))

automatically generated reader method

Source

proxy.lisp.

Target Slot

dbi-connection.

Generic Writer: (setf dbi-connection) (object)
Package

dbi-cp.proxy.

Methods
Writer Method: (setf dbi-connection) ((<dbi-connection-proxy> <dbi-connection-proxy>))

automatically generated writer method

Source

proxy.lisp.

Target Slot

dbi-connection.

Generic Reader: disconnect-fn (object)
Package

dbi-cp.proxy.

Methods
Reader Method: disconnect-fn ((<dbi-connection-proxy> <dbi-connection-proxy>))

automatically generated reader method

Source

proxy.lisp.

Target Slot

disconnect-fn.

Generic Writer: (setf disconnect-fn) (object)
Package

dbi-cp.proxy.

Methods
Writer Method: (setf disconnect-fn) ((<dbi-connection-proxy> <dbi-connection-proxy>))

automatically generated writer method

Source

proxy.lisp.

Target Slot

disconnect-fn.

Generic Function: get-connection (conn)
Package

dbi-cp.connectionpool.

Methods
Method: get-connection ((conn <dbi-connection-pool>))

get <dbi-connection-proxy> from connection pool using round-robin

Source

connectionpool.lisp.

Generic Function: shutdown (conn)
Package

dbi-cp.connectionpool.

Methods
Method: shutdown ((conn <dbi-connection-pool>))

disconnect all connections

Source

connectionpool.lisp.


6.1.4 Standalone methods

Method: begin-transaction ((conn <dbi-connection-proxy>))
Package

dbi.driver.

Source

proxy.lisp.

Method: commit ((conn <dbi-connection-proxy>))
Package

dbi.driver.

Source

proxy.lisp.

Method: disconnect ((conn <dbi-connection-proxy>))
Package

dbi.driver.

Source

proxy.lisp.

Method: do-sql ((conn <dbi-connection-proxy>) (sql string) &optional params)
Package

dbi.driver.

Source

proxy.lisp.

Method: prepare ((conn <dbi-connection-proxy>) (sql string) &rest rest &key &allow-other-keys)
Package

dbi.driver.

Source

proxy.lisp.

Method: rollback ((conn <dbi-connection-proxy>))
Package

dbi.driver.

Source

proxy.lisp.

Method: row-count ((conn <dbi-connection-proxy>))
Package

dbi.driver.

Source

proxy.lisp.


6.1.5 Conditions

Condition: <dbi-cp-no-connection>

Exception raised when no connection found on connection pool

Package

dbi-cp.error.

Source

error.lisp.

Direct superclasses

simple-error.

Condition: <dbi-cp-packet-size-exceeded>

Exception raised when query size exceeds max_allowed_packet

Package

dbi-cp.error.

Source

error.lisp.

Direct superclasses

simple-error.

Direct methods
Direct slots
Slot: query-size
Initargs

:query-size

Readers

query-size.

Writers

This slot is read-only.

Slot: max-allowed
Initargs

:max-allowed

Readers

max-allowed.

Writers

This slot is read-only.

Slot: query
Initform

(quote nil)

Initargs

:query

Readers

query.

Writers

This slot is read-only.


6.1.6 Classes

Class: <dbi-connection-pool>
Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Direct methods
Direct slots
Slot: pool

array of <pooled-connection>

Type

array

Initargs

:pool

Slot: connect-fn

function what connecto to database

Type

function

Initargs

:connect-fn

Slot: driver-name

Database driver name (:mysql, :postgres, :sqlite3, etc.)

Type

keyword

Initargs

:driver-name

Readers

driver-name.

Writers

(setf driver-name).

Slot: max-allowed-packet

MySQL max_allowed_packet value in bytes. NIL for non-MySQL connections

Type

(or null integer)

Readers

max-allowed-packet.

Writers

(setf max-allowed-packet).

Slot: checkout-timeout

Maximum wait time (in seconds) when acquiring a connection from the pool

Type

integer

Initform

30

Initargs

:checkout-timeout

Readers

checkout-timeout.

Writers

(setf checkout-timeout).

Slot: initial-size

Minimum number of connections to maintain in the pool

Type

integer

Initargs

:initial-size

Readers

initial-size.

Writers

(setf initial-size).

Slot: idle-timeout

Time in seconds after which idle connections are removed from the pool

Type

integer

Initform

600

Initargs

:idle-timeout

Readers

idle-timeout.

Writers

(setf idle-timeout).

Slot: max-lifetime

Maximum lifetime in seconds for a connection since creation. NIL disables this feature

Type

(or null integer)

Initform

1800

Initargs

:max-lifetime

Readers

max-lifetime.

Writers

(setf max-lifetime).

Slot: keepalive-interval

Interval in seconds for checking connection validity. 0 disables keepalive checks

Type

integer

Initform

0

Initargs

:keepalive-interval

Readers

keepalive-interval.

Writers

(setf keepalive-interval).

Slot: validation-query

Query used to validate connection (e.g., ’SELECT 1’). Required for keepalive to work

Type

(or null string)

Initargs

:validation-query

Readers

validation-query.

Writers

(setf validation-query).

Slot: reaper-interval

Interval in seconds between reaper thread executions

Type

integer

Initform

60

Initargs

:reaper-interval

Readers

reaper-interval.

Writers

(setf reaper-interval).

Slot: reaper-thread

Background thread that removes idle connections

Type

(or null bordeaux-threads:thread)

Readers

reaper-thread.

Writers

(setf reaper-thread).

Slot: next-index

Next starting index for round-robin connection selection

Type

integer

Initform

0

Readers

next-index.

Writers

(setf next-index).

Class: <dbi-connection-proxy>
Package

dbi-cp.proxy.

Source

proxy.lisp.

Direct methods
Direct slots
Slot: dbi-connection
Type

dbi-cp.proxy::<dbi-connection>

Initargs

:dbi-connection

Readers

dbi-connection.

Writers

(setf dbi-connection).

Slot: begin-transaction-called

Flag indicating if begin-transaction was called

Type

boolean

Slot: initial-auto-commit

Initial value of auto-commit flag

Type

boolean

Initargs

:initial-auto-commit

Slot: disconnect-fn
Type

function

Initargs

:disconnect-fn

Readers

disconnect-fn.

Writers

(setf disconnect-fn).

Slot: connection-pool

Reference to the parent connection pool

Initargs

:connection-pool

Readers

connection-pool.

Writers

(setf connection-pool).


6.2 Internals


6.2.1 Special variables

Special Variable: *connection-proxy-map*

Weak hash table mapping DBI connections to their proxies

Package

dbi-cp.proxy.

Source

proxy.lisp.


6.2.2 Macros

Macro: proxy (def-form)

just a mark

Package

dbi-cp.proxy.

Source

proxy.lisp.


6.2.3 Ordinary functions

Function: %disconnect-pooled-connection (pooled-connection)

Disconnect a pooled connection

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %make-connection! (pooled-connection dbi-connection-pool)

connect database and set parameters

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %make-connection-array! (dbi-connection-pool connection-count)

create connection array

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %make-pooledconnection-array! (cp-array array-size dbi-connection-pool)

create <pooled-connection> instance

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %reap-idle-connections (dbi-connection-pool)

Remove idle connections exceeding idle-timeout and perform keepalive checks

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %reaper-loop (dbi-connection-pool)

Reaper thread main loop - checks for idle connections periodically

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %recreate-connection! (pooled-connection dbi-connection-pool)

Recreate a connection that exceeded max-lifetime or failed validation

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %retrieve-and-adjust-max-lifetime! (dbi-connection-pool specified-max-lifetime)

Retrieve wait_timeout from MySQL server and adjust max-lifetime if needed

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %retrieve-max-allowed-packet! (dbi-connection-pool)

Retrieve max_allowed_packet from MySQL server

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %start-reaper-thread (dbi-connection-pool)

Start background thread to reap idle connections

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: %validate-connection (pooled-connection dbi-connection-pool)

Validate connection using validation-query

Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Function: estimate-query-size (sql params)

Estimate the size of a query in bytes. This is a conservative estimate.

Package

dbi-cp.proxy.

Source

proxy.lisp.

Function: find-connection-proxy (dbi-connection)

Find the connection proxy for a given DBI connection

Package

dbi-cp.proxy.

Source

proxy.lisp.

Function: register-connection-proxy (dbi-connection proxy)

Register a DBI connection to proxy mapping

Package

dbi-cp.proxy.

Source

proxy.lisp.

Function: show-connection-pool (connection-pool)

for debug

Package

dbi-cp.

Source

dbi-cp.lisp.

Function: unregister-connection-proxy (dbi-connection)

Unregister a DBI connection to proxy mapping

Package

dbi-cp.proxy.

Source

proxy.lisp.


6.2.4 Generic functions

Generic Reader: checkout-timeout (object)
Generic Writer: (setf checkout-timeout) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: checkout-timeout ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf checkout-timeout) ((<dbi-connection-pool> <dbi-connection-pool>))

Maximum wait time (in seconds) when acquiring a connection from the pool

Source

connectionpool.lisp.

Target Slot

checkout-timeout.

Generic Reader: connect-p (object)
Generic Writer: (setf connect-p) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: connect-p ((<pooled-connection> <pooled-connection>))
Writer Method: (setf connect-p) ((<pooled-connection> <pooled-connection>))

T when already connected database

Source

connectionpool.lisp.

Target Slot

connect-p.

Generic Reader: created-time (object)
Generic Writer: (setf created-time) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: created-time ((<pooled-connection> <pooled-connection>))
Writer Method: (setf created-time) ((<pooled-connection> <pooled-connection>))

Time when this connection was created (universal-time)

Source

connectionpool.lisp.

Target Slot

created-time.

Generic Reader: dbi-connection-proxy (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: dbi-connection-proxy ((<pooled-connection> <pooled-connection>))

automatically generated reader method

Source

connectionpool.lisp.

Target Slot

dbi-connection-proxy.

Generic Writer: (setf dbi-connection-proxy) (object)
Package

dbi-cp.connectionpool.

Methods
Writer Method: (setf dbi-connection-proxy) ((<pooled-connection> <pooled-connection>))

automatically generated writer method

Source

connectionpool.lisp.

Target Slot

dbi-connection-proxy.

Generic Reader: driver-name (object)
Generic Writer: (setf driver-name) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: driver-name ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf driver-name) ((<dbi-connection-pool> <dbi-connection-pool>))

Database driver name (:mysql, :postgres, :sqlite3, etc.)

Source

connectionpool.lisp.

Target Slot

driver-name.

Generic Reader: idle-timeout (object)
Generic Writer: (setf idle-timeout) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: idle-timeout ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf idle-timeout) ((<dbi-connection-pool> <dbi-connection-pool>))

Time in seconds after which idle connections are removed from the pool

Source

connectionpool.lisp.

Target Slot

idle-timeout.

Generic Reader: initial-size (object)
Generic Writer: (setf initial-size) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: initial-size ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf initial-size) ((<dbi-connection-pool> <dbi-connection-pool>))

Minimum number of connections to maintain in the pool

Source

connectionpool.lisp.

Target Slot

initial-size.

Generic Reader: keepalive-interval (object)
Generic Writer: (setf keepalive-interval) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: keepalive-interval ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf keepalive-interval) ((<dbi-connection-pool> <dbi-connection-pool>))

Interval in seconds for checking connection validity. 0 disables keepalive checks

Source

connectionpool.lisp.

Target Slot

keepalive-interval.

Generic Reader: last-keepalive-time (object)
Generic Writer: (setf last-keepalive-time) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: last-keepalive-time ((<pooled-connection> <pooled-connection>))
Writer Method: (setf last-keepalive-time) ((<pooled-connection> <pooled-connection>))

Last time keepalive check was performed (universal-time)

Source

connectionpool.lisp.

Target Slot

last-keepalive-time.

Generic Reader: last-used-time (object)
Generic Writer: (setf last-used-time) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: last-used-time ((<pooled-connection> <pooled-connection>))
Writer Method: (setf last-used-time) ((<pooled-connection> <pooled-connection>))

Last time this connection was used (universal-time)

Source

connectionpool.lisp.

Target Slot

last-used-time.

Generic Reader: max-allowed (condition)
Package

dbi-cp.error.

Methods
Reader Method: max-allowed ((condition <dbi-cp-packet-size-exceeded>))
Source

error.lisp.

Target Slot

max-allowed.

Generic Reader: max-allowed-packet (object)
Generic Writer: (setf max-allowed-packet) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: max-allowed-packet ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf max-allowed-packet) ((<dbi-connection-pool> <dbi-connection-pool>))

MySQL max_allowed_packet value in bytes. NIL for non-MySQL connections

Source

connectionpool.lisp.

Target Slot

max-allowed-packet.

Generic Reader: max-lifetime (object)
Generic Writer: (setf max-lifetime) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: max-lifetime ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf max-lifetime) ((<dbi-connection-pool> <dbi-connection-pool>))

Maximum lifetime in seconds for a connection since creation. NIL disables this feature

Source

connectionpool.lisp.

Target Slot

max-lifetime.

Generic Reader: next-index (object)
Generic Writer: (setf next-index) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: next-index ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf next-index) ((<dbi-connection-pool> <dbi-connection-pool>))

Next starting index for round-robin connection selection

Source

connectionpool.lisp.

Target Slot

next-index.

Generic Reader: query (condition)
Package

dbi-cp.error.

Methods
Reader Method: query ((condition <dbi-cp-packet-size-exceeded>))
Source

error.lisp.

Target Slot

query.

Generic Reader: query-size (condition)
Package

dbi-cp.error.

Methods
Reader Method: query-size ((condition <dbi-cp-packet-size-exceeded>))
Source

error.lisp.

Target Slot

query-size.

Generic Reader: reaper-interval (object)
Generic Writer: (setf reaper-interval) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: reaper-interval ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf reaper-interval) ((<dbi-connection-pool> <dbi-connection-pool>))

Interval in seconds between reaper thread executions

Source

connectionpool.lisp.

Target Slot

reaper-interval.

Generic Reader: reaper-thread (object)
Generic Writer: (setf reaper-thread) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: reaper-thread ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf reaper-thread) ((<dbi-connection-pool> <dbi-connection-pool>))

Background thread that removes idle connections

Source

connectionpool.lisp.

Target Slot

reaper-thread.

Generic Reader: semaphore (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: semaphore ((<pooled-connection> <pooled-connection>))

automatically generated reader method

Source

connectionpool.lisp.

Target Slot

semaphore.

Generic Writer: (setf semaphore) (object)
Package

dbi-cp.connectionpool.

Methods
Writer Method: (setf semaphore) ((<pooled-connection> <pooled-connection>))

automatically generated writer method

Source

connectionpool.lisp.

Target Slot

semaphore.

Generic Reader: validation-query (object)
Generic Writer: (setf validation-query) (object)
Package

dbi-cp.connectionpool.

Methods
Reader Method: validation-query ((<dbi-connection-pool> <dbi-connection-pool>))
Writer Method: (setf validation-query) ((<dbi-connection-pool> <dbi-connection-pool>))

Query used to validate connection (e.g., ’SELECT 1’). Required for keepalive to work

Source

connectionpool.lisp.

Target Slot

validation-query.


6.2.5 Classes

Class: <pooled-connection>
Package

dbi-cp.connectionpool.

Source

connectionpool.lisp.

Direct methods
Direct slots
Slot: connect-p

T when already connected database

Type

boolean

Readers

connect-p.

Writers

(setf connect-p).

Slot: semaphore
Initform

(bt-semaphore:make-semaphore :count 1)

Readers

semaphore.

Writers

(setf semaphore).

Slot: dbi-connection-proxy
Type

(or null dbi-cp.proxy:<dbi-connection-proxy>)

Initargs

:dbi-connection-proxy

Readers

dbi-connection-proxy.

Writers

(setf dbi-connection-proxy).

Slot: last-used-time

Last time this connection was used (universal-time)

Type

(or null integer)

Readers

last-used-time.

Writers

(setf last-used-time).

Slot: created-time

Time when this connection was created (universal-time)

Type

(or null integer)

Readers

created-time.

Writers

(setf created-time).

Slot: last-keepalive-time

Last time keepalive check was performed (universal-time)

Type

(or null integer)

Readers

last-keepalive-time.

Writers

(setf last-keepalive-time).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
B   C   D   E   F   G   I   K   L   M   N   P   Q   R   S   U   V   W  
Index Entry  Section

%
%disconnect-pooled-connection: Private ordinary functions
%make-connection!: Private ordinary functions
%make-connection-array!: Private ordinary functions
%make-pooledconnection-array!: Private ordinary functions
%reap-idle-connections: Private ordinary functions
%reaper-loop: Private ordinary functions
%recreate-connection!: Private ordinary functions
%retrieve-and-adjust-max-lifetime!: Private ordinary functions
%retrieve-max-allowed-packet!: Private ordinary functions
%start-reaper-thread: Private ordinary functions
%validate-connection: Private ordinary functions

(
(setf checkout-timeout): Private generic functions
(setf checkout-timeout): Private generic functions
(setf connect-p): Private generic functions
(setf connect-p): Private generic functions
(setf connection-pool): Public generic functions
(setf connection-pool): Public generic functions
(setf created-time): Private generic functions
(setf created-time): Private generic functions
(setf dbi-connection): Public generic functions
(setf dbi-connection): Public generic functions
(setf dbi-connection-proxy): Private generic functions
(setf dbi-connection-proxy): Private generic functions
(setf disconnect-fn): Public generic functions
(setf disconnect-fn): Public generic functions
(setf driver-name): Private generic functions
(setf driver-name): Private generic functions
(setf idle-timeout): Private generic functions
(setf idle-timeout): Private generic functions
(setf initial-size): Private generic functions
(setf initial-size): Private generic functions
(setf keepalive-interval): Private generic functions
(setf keepalive-interval): Private generic functions
(setf last-keepalive-time): Private generic functions
(setf last-keepalive-time): Private generic functions
(setf last-used-time): Private generic functions
(setf last-used-time): Private generic functions
(setf max-allowed-packet): Private generic functions
(setf max-allowed-packet): Private generic functions
(setf max-lifetime): Private generic functions
(setf max-lifetime): Private generic functions
(setf next-index): Private generic functions
(setf next-index): Private generic functions
(setf reaper-interval): Private generic functions
(setf reaper-interval): Private generic functions
(setf reaper-thread): Private generic functions
(setf reaper-thread): Private generic functions
(setf semaphore): Private generic functions
(setf semaphore): Private generic functions
(setf validation-query): Private generic functions
(setf validation-query): Private generic functions

B
begin-transaction: Public standalone methods

C
check-packet-size: Public ordinary functions
checkout-timeout: Private generic functions
checkout-timeout: Private generic functions
commit: Public standalone methods
connect-p: Private generic functions
connect-p: Private generic functions
connection-pool: Public generic functions
connection-pool: Public generic functions
created-time: Private generic functions
created-time: Private generic functions

D
dbi-connection: Public generic functions
dbi-connection: Public generic functions
dbi-connection-proxy: Private generic functions
dbi-connection-proxy: Private generic functions
disconnect: Public standalone methods
disconnect-fn: Public generic functions
disconnect-fn: Public generic functions
do-sql: Public standalone methods
driver-name: Private generic functions
driver-name: Private generic functions

E
estimate-query-size: Private ordinary functions

F
find-connection-proxy: Private ordinary functions
Function, %disconnect-pooled-connection: Private ordinary functions
Function, %make-connection!: Private ordinary functions
Function, %make-connection-array!: Private ordinary functions
Function, %make-pooledconnection-array!: Private ordinary functions
Function, %reap-idle-connections: Private ordinary functions
Function, %reaper-loop: Private ordinary functions
Function, %recreate-connection!: Private ordinary functions
Function, %retrieve-and-adjust-max-lifetime!: Private ordinary functions
Function, %retrieve-max-allowed-packet!: Private ordinary functions
Function, %start-reaper-thread: Private ordinary functions
Function, %validate-connection: Private ordinary functions
Function, check-packet-size: Public ordinary functions
Function, estimate-query-size: Private ordinary functions
Function, find-connection-proxy: Private ordinary functions
Function, get-max-allowed-packet: Public ordinary functions
Function, make-dbi-connection-pool: Public ordinary functions
Function, packet-size-exceeded-p: Public ordinary functions
Function, register-connection-proxy: Private ordinary functions
Function, show-connection-pool: Private ordinary functions
Function, unregister-connection-proxy: Private ordinary functions

G
Generic Function, (setf checkout-timeout): Private generic functions
Generic Function, (setf connect-p): Private generic functions
Generic Function, (setf connection-pool): Public generic functions
Generic Function, (setf created-time): Private generic functions
Generic Function, (setf dbi-connection): Public generic functions
Generic Function, (setf dbi-connection-proxy): Private generic functions
Generic Function, (setf disconnect-fn): Public generic functions
Generic Function, (setf driver-name): Private generic functions
Generic Function, (setf idle-timeout): Private generic functions
Generic Function, (setf initial-size): Private generic functions
Generic Function, (setf keepalive-interval): Private generic functions
Generic Function, (setf last-keepalive-time): Private generic functions
Generic Function, (setf last-used-time): Private generic functions
Generic Function, (setf max-allowed-packet): Private generic functions
Generic Function, (setf max-lifetime): Private generic functions
Generic Function, (setf next-index): Private generic functions
Generic Function, (setf reaper-interval): Private generic functions
Generic Function, (setf reaper-thread): Private generic functions
Generic Function, (setf semaphore): Private generic functions
Generic Function, (setf validation-query): Private generic functions
Generic Function, checkout-timeout: Private generic functions
Generic Function, connect-p: Private generic functions
Generic Function, connection-pool: Public generic functions
Generic Function, created-time: Private generic functions
Generic Function, dbi-connection: Public generic functions
Generic Function, dbi-connection-proxy: Private generic functions
Generic Function, disconnect-fn: Public generic functions
Generic Function, driver-name: Private generic functions
Generic Function, get-connection: Public generic functions
Generic Function, idle-timeout: Private generic functions
Generic Function, initial-size: Private generic functions
Generic Function, keepalive-interval: Private generic functions
Generic Function, last-keepalive-time: Private generic functions
Generic Function, last-used-time: Private generic functions
Generic Function, max-allowed: Private generic functions
Generic Function, max-allowed-packet: Private generic functions
Generic Function, max-lifetime: Private generic functions
Generic Function, next-index: Private generic functions
Generic Function, query: Private generic functions
Generic Function, query-size: Private generic functions
Generic Function, reaper-interval: Private generic functions
Generic Function, reaper-thread: Private generic functions
Generic Function, semaphore: Private generic functions
Generic Function, shutdown: Public generic functions
Generic Function, validation-query: Private generic functions
get-connection: Public generic functions
get-connection: Public generic functions
get-max-allowed-packet: Public ordinary functions

I
idle-timeout: Private generic functions
idle-timeout: Private generic functions
initial-size: Private generic functions
initial-size: Private generic functions

K
keepalive-interval: Private generic functions
keepalive-interval: Private generic functions

L
last-keepalive-time: Private generic functions
last-keepalive-time: Private generic functions
last-used-time: Private generic functions
last-used-time: Private generic functions

M
Macro, proxy: Private macros
Macro, with-transaction: Public macros
make-dbi-connection-pool: Public ordinary functions
max-allowed: Private generic functions
max-allowed: Private generic functions
max-allowed-packet: Private generic functions
max-allowed-packet: Private generic functions
max-lifetime: Private generic functions
max-lifetime: Private generic functions
Method, (setf checkout-timeout): Private generic functions
Method, (setf connect-p): Private generic functions
Method, (setf connection-pool): Public generic functions
Method, (setf created-time): Private generic functions
Method, (setf dbi-connection): Public generic functions
Method, (setf dbi-connection-proxy): Private generic functions
Method, (setf disconnect-fn): Public generic functions
Method, (setf driver-name): Private generic functions
Method, (setf idle-timeout): Private generic functions
Method, (setf initial-size): Private generic functions
Method, (setf keepalive-interval): Private generic functions
Method, (setf last-keepalive-time): Private generic functions
Method, (setf last-used-time): Private generic functions
Method, (setf max-allowed-packet): Private generic functions
Method, (setf max-lifetime): Private generic functions
Method, (setf next-index): Private generic functions
Method, (setf reaper-interval): Private generic functions
Method, (setf reaper-thread): Private generic functions
Method, (setf semaphore): Private generic functions
Method, (setf validation-query): Private generic functions
Method, begin-transaction: Public standalone methods
Method, checkout-timeout: Private generic functions
Method, commit: Public standalone methods
Method, connect-p: Private generic functions
Method, connection-pool: Public generic functions
Method, created-time: Private generic functions
Method, dbi-connection: Public generic functions
Method, dbi-connection-proxy: Private generic functions
Method, disconnect: Public standalone methods
Method, disconnect-fn: Public generic functions
Method, do-sql: Public standalone methods
Method, driver-name: Private generic functions
Method, get-connection: Public generic functions
Method, idle-timeout: Private generic functions
Method, initial-size: Private generic functions
Method, keepalive-interval: Private generic functions
Method, last-keepalive-time: Private generic functions
Method, last-used-time: Private generic functions
Method, max-allowed: Private generic functions
Method, max-allowed-packet: Private generic functions
Method, max-lifetime: Private generic functions
Method, next-index: Private generic functions
Method, prepare: Public standalone methods
Method, query: Private generic functions
Method, query-size: Private generic functions
Method, reaper-interval: Private generic functions
Method, reaper-thread: Private generic functions
Method, rollback: Public standalone methods
Method, row-count: Public standalone methods
Method, semaphore: Private generic functions
Method, shutdown: Public generic functions
Method, validation-query: Private generic functions

N
next-index: Private generic functions
next-index: Private generic functions

P
packet-size-exceeded-p: Public ordinary functions
prepare: Public standalone methods
proxy: Private macros

Q
query: Private generic functions
query: Private generic functions
query-size: Private generic functions
query-size: Private generic functions

R
reaper-interval: Private generic functions
reaper-interval: Private generic functions
reaper-thread: Private generic functions
reaper-thread: Private generic functions
register-connection-proxy: Private ordinary functions
rollback: Public standalone methods
row-count: Public standalone methods

S
semaphore: Private generic functions
semaphore: Private generic functions
show-connection-pool: Private ordinary functions
shutdown: Public generic functions
shutdown: Public generic functions

U
unregister-connection-proxy: Private ordinary functions

V
validation-query: Private generic functions
validation-query: Private generic functions

W
with-transaction: Public macros


A.3 Variables

Jump to:   *  
B   C   D   I   K   L   M   N   P   Q   R   S   V  
Index Entry  Section

*
*connection-proxy-map*: Private special variables

B
begin-transaction-called: Public classes

C
checkout-timeout: Public classes
connect-fn: Public classes
connect-p: Private classes
connection-pool: Public classes
created-time: Private classes

D
dbi-connection: Public classes
dbi-connection-proxy: Private classes
disconnect-fn: Public classes
driver-name: Public classes

I
idle-timeout: Public classes
initial-auto-commit: Public classes
initial-size: Public classes

K
keepalive-interval: Public classes

L
last-keepalive-time: Private classes
last-used-time: Private classes

M
max-allowed: Public conditions
max-allowed-packet: Public classes
max-lifetime: Public classes

N
next-index: Public classes

P
pool: Public classes

Q
query: Public conditions
query-size: Public conditions

R
reaper-interval: Public classes
reaper-thread: Public classes

S
semaphore: Private classes
Slot, begin-transaction-called: Public classes
Slot, checkout-timeout: Public classes
Slot, connect-fn: Public classes
Slot, connect-p: Private classes
Slot, connection-pool: Public classes
Slot, created-time: Private classes
Slot, dbi-connection: Public classes
Slot, dbi-connection-proxy: Private classes
Slot, disconnect-fn: Public classes
Slot, driver-name: Public classes
Slot, idle-timeout: Public classes
Slot, initial-auto-commit: Public classes
Slot, initial-size: Public classes
Slot, keepalive-interval: Public classes
Slot, last-keepalive-time: Private classes
Slot, last-used-time: Private classes
Slot, max-allowed: Public conditions
Slot, max-allowed-packet: Public classes
Slot, max-lifetime: Public classes
Slot, next-index: Public classes
Slot, pool: Public classes
Slot, query: Public conditions
Slot, query-size: Public conditions
Slot, reaper-interval: Public classes
Slot, reaper-thread: Public classes
Slot, semaphore: Private classes
Slot, validation-query: Public classes
Special Variable, *connection-proxy-map*: Private special variables

V
validation-query: Public classes


A.4 Data types

Jump to:   <  
C   D   E   F   M   P   S  
Index Entry  Section

<
<dbi-connection-pool>: Public classes
<dbi-connection-proxy>: Public classes
<dbi-cp-no-connection>: Public conditions
<dbi-cp-packet-size-exceeded>: Public conditions
<pooled-connection>: Private classes

C
cl-dbi-connection-pool: The cl-dbi-connection-pool system
cl-dbi-connection-pool-asd: The cl-dbi-connection-pool-asd package
cl-dbi-connection-pool.asd: The cl-dbi-connection-pool/cl-dbi-connection-pool․asd file
Class, <dbi-connection-pool>: Public classes
Class, <dbi-connection-proxy>: Public classes
Class, <pooled-connection>: Private classes
Condition, <dbi-cp-no-connection>: Public conditions
Condition, <dbi-cp-packet-size-exceeded>: Public conditions
connectionpool.lisp: The dbi-cp/src/connectionpool․lisp file

D
dbi-cp: The dbi-cp system
dbi-cp: The dbi-cp package
dbi-cp-asd: The dbi-cp-asd package
dbi-cp.asd: The dbi-cp/dbi-cp․asd file
dbi-cp.connectionpool: The dbi-cp․connectionpool package
dbi-cp.error: The dbi-cp․error package
dbi-cp.lisp: The dbi-cp/src/dbi-cp․lisp file
dbi-cp.proxy: The dbi-cp․proxy package

E
error.lisp: The dbi-cp/src/error․lisp file

F
File, cl-dbi-connection-pool.asd: The cl-dbi-connection-pool/cl-dbi-connection-pool․asd file
File, connectionpool.lisp: The dbi-cp/src/connectionpool․lisp file
File, dbi-cp.asd: The dbi-cp/dbi-cp․asd file
File, dbi-cp.lisp: The dbi-cp/src/dbi-cp․lisp file
File, error.lisp: The dbi-cp/src/error․lisp file
File, proxy.lisp: The dbi-cp/src/proxy․lisp file

M
Module, src: The dbi-cp/src module

P
Package, cl-dbi-connection-pool-asd: The cl-dbi-connection-pool-asd package
Package, dbi-cp: The dbi-cp package
Package, dbi-cp-asd: The dbi-cp-asd package
Package, dbi-cp.connectionpool: The dbi-cp․connectionpool package
Package, dbi-cp.error: The dbi-cp․error package
Package, dbi-cp.proxy: The dbi-cp․proxy package
proxy.lisp: The dbi-cp/src/proxy․lisp file

S
src: The dbi-cp/src module
System, cl-dbi-connection-pool: The cl-dbi-connection-pool system
System, dbi-cp: The dbi-cp system