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

NextPrevUpTopContentsIndex

find-database

Function
Summary

Returns a database, given a database or database name.

Package

sql

Signature

find-database database &optional errorp => database , count

Arguments

database

A string or a database.

errorp

A boolean. Default value: t .

Values

database

A database.

count

An integer.

Description

The function find-database , given a string database , searches amongst the connected databases for one matching the name database .

If there is exactly one such database, it is returned and the second return value count is 1. If more than one databases match and errorp is nil , then the most recently connected of the matching databases is returned and count is the number of matches. If no matching database is found and errorp is nil , then nil is returned. If none, or more than one, matching databases are found and errorp is true, then an error is signalled.

If the argument database is a database, it is simply returned.

See also

connect
connected-databases
database-name
disconnect
status


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex