RECONNECT — Re-establishes the connection between a database object and its RDBMS.
Function
The database to reconnect, which defaults to the database indicated by *default-database*.
A boolean flag indicating whether to signal an error if database is non-nil but cannot be found. The default value is NIL.
A Boolean indicating whether to signal an error if the database connection has been lost. The default value is T.
A Boolean indicating whether the database was successfully reconnected.
Reconnects database which defaults to *default-database* to the underlying database management system. On success, T is returned and the variable *default-database* is set to the newly reconnected database. If database is a database instance, this object is closed. If database is a string, then a connected database whose name matches database is sought in the list of connected databases. If no matching database is found and error and database are both non-NIL an error is signaled, otherwise NIL is returned.
When the current database connection has been lost, if force is non-NIL as it is by default, the connection is closed and errors are suppressed. If force is NIL and the database connection cannot be closed, an error is signalled.
*default-database* => #<CLSQL-SQLITE:SQLITE-DATABASE :memory: OPEN {48CFBEA5}> (reconnect) => #<CLSQL-SQLITE:SQLITE-DATABASE :memory: OPEN {48D64105}>
A database connection is re-established and *default-database* may be rebound to the supplied database object.