DATABASE-NAME — Get the name of a database objectGeneric Function
database
A database object, either of type database or of type closed-database.
A string describing the identity of the database to which this database object is connected to.
This function returns the database name of the given
database. The database name is a string which somehow
describes the identity of the database to which this
database object is or has been connected. The database name
of a database object is determined at
connect
time, when a call to
database-name-from-spec
derives the
database name from the connection specification passed to
connect
in the
connection-spec
parameter.
The database name is used via
find-database
in
connect
to determine whether database
connections to the specified database exist already.
Usually the database name string will include indications of the host, database name, user, or port that where used during the connection attempt. The only important thing is that this string shall try to identify the database at the other end of the connection. Connection specifications parts like passwords and credentials shall not be used as part of the database name.
(database-name-from-spec '("dent" "newesim" "dent" "dent") :mysql) => "dent/newesim/dent" (connect '("dent" "newesim" "dent" "dent") :database-type :mysql) => #<CLSQL-MYSQL:MYSQL-DATABASE {48391DCD}> (database-name *default-database*) => "dent/newesim/dent" (database-name-from-spec '(nil "template1" "dent" nil) :postgresql) => "/template1/dent" (connect '(nil "template1" "dent" nil) :database-type :postgresql) => #<CLSQL-POSTGRESQL:POSTGRESQL-DATABASE {48392D2D}> (database-name *default-database*) => "/template1/dent" (database-name-from-spec '("www.pmsf.de" "template1" "dent" nil) :postgresql) => "www.pmsf.de/template1/dent"