X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fref_clsql.xml;h=c24b2ced5462fb4ac7780fcd83e973e22638a296;hb=105606732f2cc5681c7eb76da58a11988ba64d96;hp=6fadbae16e0396430b0ff643188d6746c6d503ac;hpb=5691bb90517d7c565a141d131da76c3de1f8d566;p=clsql.git
diff --git a/doc/ref_clsql.xml b/doc/ref_clsql.xml
index 6fadbae..c24b2ce 100644
--- a/doc/ref_clsql.xml
+++ b/doc/ref_clsql.xml
@@ -1650,6 +1650,237 @@ The default is &nil;.
+
+
+ CREATE-DATABASE
+ create a database
+ Function
+
+
+ Syntax
+ create-database connection-spec &key database-type => success
+
+
+ Arguments and Values
+
+
+ connection-spec
+
+ A connection specification
+
+
+
+ database-type
+
+ A database type specifier, i.e. a keyword.
+ This defaults to the value of
+ *default-database-type*
+
+
+
+ success
+
+ A boolean flag. If &t;, a new database was
+ successfully created.
+
+
+
+
+
+
+ Description
+ This function creates a database in the database system
+ specified by database-type.
+
+
+
+ Examples
+
+(create-database '("localhost" "new" "dent" "dent") :database-type :mysql)
+=> T
+
+(create-database '("localhost" "new" "dent" "badpasswd") :database-type :mysql)
+=>
+Error: While trying to access database localhost/new/dent
+ using database-type MYSQL:
+ Error database-create failed: mysqladmin: connect to server at 'localhost' failed
+error: 'Access denied for user: 'root@localhost' (Using password: YES)'
+ has occurred.
+ [condition type: CLSQL-ACCESS-ERROR]
+
+
+
+ Side Effects
+ A database will be created on the filesystem of the host.
+
+
+ Exceptional Situations
+ An exception will be thrown if the database system does
+ not allow new databases to be created or if database creation
+ fails.
+
+
+ Notes
+ This function may invoke the operating systems
+ functions. Thus, some database systems may require the
+ administration functions to be available in the current
+ PATH. At this time, the
+ :mysql backend requires
+ mysqladmin and the
+ :postgresql backend requires
+ createdb.
+
+
+
+
+
+ DESTROY-DATABASE
+ destroys a database
+ Function
+
+
+ Syntax
+ destroy-database connection-spec &key database-type => success
+
+
+ Arguments and Values
+
+
+ connection-spec
+
+ A connection specification
+
+
+
+ database-type
+
+ A database type specifier, i.e. a keyword.
+ This defaults to the value of
+ *default-database-type*
+
+
+
+ success
+
+ A boolean flag. If &t;, the database was
+ successfully destroyed.
+
+
+
+
+
+
+ Description
+ This function destroy a database in the database system
+ specified by database-type.
+
+
+
+ Examples
+
+(destroy-database '("localhost" "new" "dent" "dent") :database-type :postgresql)
+=> T
+
+(destroy-database '("localhost" "new" "dent" "dent") :database-type :postgresql)
+=>
+Error: While trying to access database localhost/test2/root
+ using database-type POSTGRESQL:
+ Error database-destory failed: dropdb: database removal failed: ERROR: database "test2" does not exist
+ has occurred.
+ [condition type: CLSQL-ACCESS-ERROR]
+
+
+
+ Side Effects
+ A database will be removed from the filesystem of the host.
+
+
+ Exceptional Situations
+ An exception will be thrown if the database system does not
+ allow databases to be removed, the database does not exist, or
+ if database removal fails.
+
+
+ Notes
+ This function may invoke the operating systems
+ functions. Thus, some database systems may require the
+ administration functions to be available in the current
+ PATH. At this time, the
+ :mysql backend requires
+ mysqladmin and the
+ :postgresql backend requires
+ dropdb.
+
+
+
+
+
+ PROBE-DATABASE
+ tests for existence of a database
+ Function
+
+
+ Syntax
+ probe-database connection-spec &key database-type => success
+
+
+ Arguments and Values
+
+
+ connection-spec
+
+ A connection specification
+
+
+
+ database-type
+
+ A database type specifier, i.e. a keyword.
+ This defaults to the value of
+ *default-database-type*
+
+
+
+ success
+
+ A boolean flag. If &t;, the database exists
+ in the database system.
+
+
+
+
+
+
+ Description
+ This function tests for the existence of a database in
+ the database system specified by
+ database-type.
+
+
+
+ Examples
+
+(probe-database '("localhost" "new" "dent" "dent") :database-type :postgresql)
+=> T
+
+
+
+ Side Effects
+ None
+
+
+ Exceptional Situations
+ An exception maybe thrown if the database system does
+ not receive administrator-level authentication since function
+ may need to read the administrative database of the database
+ system.
+
+
+ Notes
+ None.
+
+
+
DATABASE-NAME-FROM-SPEC
@@ -1868,7 +2099,7 @@ The default is &nil;.
Syntax
- query query-expression &key database result-types => result
+ query query-expression &key database result-types field-names => result
Arguments and Values
@@ -1933,6 +2164,15 @@ The default is &nil;.
+
+ field-names
+
+ A boolean with a default value of &t;. When &t;, this
+ function results a second value of a list of field
+ names. When &nil;, this function only returns one value
+ - the list of rows.
+
+
result