All Manuals > LispWorks User Guide and Reference Manual > 47 The SQL Package

NextPrevUpTopContentsIndex

reconnect

Function
Summary

Reconnects a database to its underlying RDBMS.

Package

sql

Signature

reconnect &key database error force => success

Arguments

database

The database to be reconnected.

error

A boolean.

force

A boolean.

Values

success

A boolean.

Description

The function reconnect reconnects database to its underlying RDBMS. If successful, success is t and the variable *default-database* is set to the newly reconnected database.

The default value for database is *default-database*. If database is a database object, then it is used directly. Otherwise, the list of connected databases is searched to find one with database as its connection specifications (see connect). If no such database is found, then if error and database are both non-nil an error is signaled, otherwise reconnect returns nil.

force controls whether an error should be signaled if the existing database connection cannot be closed. When non-nil (this is the default value) the connection is closed without error checking. When force is nil, an error is signaled if the database connection has been lost.

Notes

force non-nil might result in a memory leak if the database driver fails to release its memory (some drivers do not allow the connection to be closed if the underlying RDBMS is not responding).

See also

connect
connected-databases
*default-database*


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex