X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=doc%2Fref-conditions.xml;h=3e1748903c13a94614c2de75f5c72bb1cc4a11b8;hp=650dd98343a1e3a5fb3be0bfd36866e77c32e6cb;hb=8a13e05588cb35ffeed91cca2dc26c313e387d70;hpb=bb71f27c241187a32c7839aea501114d65e29f85 diff --git a/doc/ref-conditions.xml b/doc/ref-conditions.xml index 650dd98..3e17489 100644 --- a/doc/ref-conditions.xml +++ b/doc/ref-conditions.xml @@ -6,34 +6,49 @@ ]> + CLSQL Condition System - + - + &clsql; provides and uses a condition system in which all errors + and warnings are of type sql-condition. This + section describes the various subclasses of sql-condition + defined by &clsql;. Details are also provided for how they are + used in &clsql; and intended to be signalled in user + code. Finally, slot accessors for some of the condition types + are described. + + *BACKEND-WARNING-BEHAVIOR* + - *BACKEND-WARNING-BEHAVIOR* - + Variable *BACKEND-WARNING-BEHAVIOR* + Controls behaviour on warnings from underlying RDBMS. Variable Value Type - + Meaningful values are :warn, + :error, :ignore and &nil;. Initial Value - nil + :warn Description Action to perform on warning messages - from backend. Default is to :warn. May also be set to :error to - signal an error or :ignore/nil to silently ignore the warning. + from backend. Default is to :warn. May also be + set to :error to signal an error or + :ignore or &nil; to silently ignore the + warning. Examples @@ -51,584 +66,745 @@ Notes - None. + *backend-warning-behaviour* is a &clsql; + extension. - - - SQL-CONDITION - the super-type of all - &clsql;-specific - conditions - Condition Type - - - Class Precedence List - - - sql-condition - condition - t - - - - - Description - This is the super-type of all - &clsql;-specific conditions - defined by &clsql;, or any of it's - database-specific interfaces. There are no defined - initialization arguments nor any accessors. - - + + + SQL-CONDITION + + + Condition Type Condition Type SQL-CONDITION + the super-type of all + &clsql;-specific + conditions + Condition Type + + + Class Precedence List + + + sql-condition + condition + t + + + + + Description + + This is the super-type of all &clsql;-specific conditions + defined by &clsql;, or any of it's database-specific + interfaces. There are no defined initialization arguments nor + any accessors. + + + + Notes + sql-condition is a &clsql; + extension. + + - - - SQL-ERROR - the super-type of all - &clsql;-specific - errors - Condition Type - - - Class Precedence List - - - sql-error - error - serious-condition - sql-condition - condition - t - - - - - Description - This is the super-type of all - &clsql;-specific conditions that - represent errors, as defined by - &clsql;, or any of it's - database-specific interfaces. There are no defined - initialization arguments nor any accessors. - - + + + SQL-ERROR + + + Condition Type SQL-ERROR + the super-type of all + &clsql;-specific + errors + Condition Type + + + Class Precedence List + + + sql-error + simple-error + simple-condition + error + serious-condition + sql-condition + condition + t + + + + + Description + + This is the super-type of all &clsql;-specific conditions that + represent errors, as defined by &clsql;, or any of it's + database-specific interfaces. There are no defined + initialization arguments nor any accessors. + + + + Notes + sql-error is a &clsql; extension. + + - - - SQL-WARNING - the super-type of all - &clsql;-specific - warnings - Condition Type - - - Class Precedence List - - - sql-warning - warning - sql-condition - condition - t - - - - - Description - This is the super-type of all - &clsql;-specific conditions that - represent warnings, as defined by - &clsql;, or any of it's - database-specific interfaces. There are no defined - initialization arguments nor any accessors. - - + + + SQL-WARNING + + + Condition Type SQL-WARNING + the super-type of all + &clsql;-specific + warnings + Condition Type + + + Class Precedence List + + + sql-warning + warning + sql-condition + condition + t + + + + + Description + + This is the super-type of all &clsql;-specific conditions that + represent warnings, as defined by &clsql;, or any of it's + database-specific interfaces. There are no defined + initialization arguments nor any accessors. + + + + Notes + sql-warning is a &clsql; extension. + + - - - SQL-DATABASE-WARNING - Used to warn while accessing a - &clsql; database. - Condition Type - - - Class Precedence List - - - sql-database-warning - sql-warning - warning - sql-condition - condition - t - - - - - Description - - This condition represents warnings signalled while accessing - a database. The following initialization arguments and - accessors exist: - - - Initarg - Accessor - Description - - :database - sql-warning-database - The database object that was involved in the - incident. - - - - + + + SQL-DATABASE-WARNING + + + Condition Type SQL-DATABASE-WARNING + Used to warn while accessing a + &clsql; database. + Condition Type + + + Class Precedence List + + + sql-database-warning + sql-warning + warning + sql-condition + condition + t + + + + + Description + + This condition represents warnings signalled while accessing + a database. + + + The following initialization arguments and accessors exist: + + + Initarg + Accessor + Description + + :database + sql-warning-database + The database object that was involved in the + incident. + + + + + Notes + sql-database-warning is a &clsql; + extension. + + - + - - - SQL-USER-ERROR - condition representing errors because of invalid - parameters from the library user. - Condition Type - - - Class Precedence List - - - sql-user-error - sql-error - sql-condition - condition - t - - - - - Description - This condition represents errors that occur because the - user supplies invalid data to &clsql;. This includes errors such as - an invalid format connection specification or an error in the syntax - for the LOOP macro extensions. - The following initialization arguments and - accessors exist: - - - Initarg - Accessor - Description - - :message - sql-user-error-message - The error message. - - - - + + + SQL-USER-ERROR + + + Condition Type SQL-USER-ERROR + condition representing errors because of invalid + parameters from the library user. + Condition Type + + + Class Precedence List + + + sql-user-error + sql-error + simple-error + simple-condition + error + serious-condition + sql-condition + condition + t + + + + + Description + + This condition represents errors that occur because the user + supplies invalid data to &clsql;. This includes errors such + as an invalid format connection specification or an error in + the syntax for the LOOP macro extensions. + + + The following initialization arguments and accessors exist: + + + Initarg + Accessor + Description + + :message + sql-user-error-message + The error message. + + + + + Notes + The slot accessor + sql-user-error-message is a &clsql; + extension. + + - - - SQL-DATABASE-ERROR - condition representing errors during query or - command execution - Condition Type - - - Class Precedence List - - - sql-database-error - sql-error - error - serious-condition - sql-condition - condition - t - - - - - Description - This condition represents errors that occur while - executing SQL statements, either as part of query operations - or command execution, either explicitly or implicitly, as - caused e.g. by with-transaction. - The following initialization arguments and accessors exist: - - Initarg - Accessor - Description - - :database - sql-database-error-database - The database object that was involved in the - incident. - - - :error-id - sql-error-error-id - The numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :secondary-error-id - sql-error-secondary-error-id - The secondary numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :message - sql-error-database-message - A string describing the problem that occurred, - possibly one returned by the database back-end. - - - - + + + SQL-DATABASE-ERROR + + + Condition Type SQL-DATABASE-ERROR + condition representing errors during query or + command execution + Condition Type + + + Class Precedence List + + + sql-database-error + sql-error + simple-error + simple-condition + error + serious-condition + sql-condition + condition + t + + + + + Description + + This condition represents errors that occur while executing + SQL statements, either as part of query operations or command + execution, either explicitly or implicitly, as caused e.g. by + with-transaction. + + + The following initialization arguments and accessors exist: + + + Initarg + Accessor + Description + + :database + sql-error-database + The database object that was involved in the + incident. + + + :error-id + sql-error-error-id + The numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :secondary-error-id + sql-error-secondary-error-id + The secondary numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :message + sql-error-database-message + A string describing the problem that occurred, + possibly one returned by the database back-end. + + + + + Notes + + The slot accessor + sql-error-database is a &clsql; + extension. + + + - - - SQL-CONNECTION-ERROR - condition representing errors during - connection - Condition Type - - - Class Precedence List - - - sql-connection-error - sql-database-error - sql-error - sql-condition - condition - t - - - - - Description - This condition represents errors that occur while trying - to connect to a database. The following initialization - arguments and accessors exist: - - Initarg - Accessor - Description - - :database-type - sql-connection-error-database-type - Database type for the connection attempt - - - :connection-spec - sql-connection-error-connection-spec - The connection specification used in the - connection attempt. - - - :database - sql-database-error-database - The database object that was involved in the - incident. - - - :error-id - sql-error-error-id - The numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :secondary-error-id - sql-error-secondary-error-id - The secondary numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :message - sql-database-error-error - A string describing the problem that occurred, - possibly one returned by the database back-end. - - - - + + + SQL-CONNECTION-ERROR + + + Condition Type SQL-CONNECTION-ERROR + condition representing errors during + connection + Condition Type + + + Class Precedence List + + + sql-connection-error + sql-database-error + sql-error + simple-error + simple-condition + error + serious-condition + sql-condition + condition + t + + + + + Description + + This condition represents errors that occur while trying to + connect to a database. + + + The following initialization arguments and accessors exist: + + + Initarg + Accessor + Description + + :database-type + sql-error-database-type + Database type for the connection attempt + + + :connection-spec + sql-error-connection-spec + The connection specification used in the + connection attempt. + + + :database + sql-error-database + The database object that was involved in the + incident. + + + :error-id + sql-error-error-id + The numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :secondary-error-id + sql-error-secondary-error-id + The secondary numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :message + sql-database-error-error + A string describing the problem that occurred, + possibly one returned by the database back-end. + + + + + Notes + + The slot accessors + sql-error-database, + sql-error-database-type and + sql-error-connection-spec are + &clsql; extensions. + + + - - - SQL-DATABASE-DATA-ERROR - Used to signal an error with the SQL data passed - to a database. - Condition Type - - - Class Precedence List - - - sql-database-data-error - sql-database-error - sql-error - error - serious-condition - sql-condition - condition - t - - - - - Description - This condition represents errors that occur while - executing SQL statements, specifically as a result of - malformed SQL expressions. The following initialization - arguments and accessors exist: - - Initarg - Accessor - Description - - :expression - sql-database-error-expression - The SQL expression whose execution caused the error. - - - :database - sql-database-error-database - The database object that was involved in the - incident. - - - :error-id - sql-error-error-id - The numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :secondary-error-id - sql-error-secondary-error-id - The secondary numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :message - sql-error-database-message - A string describing the problem that occurred, - possibly one returned by the database back-end. - - - - + + + SQL-DATABASE-DATA-ERROR + + + Condition Type SQL-DATABASE-DATA-ERROR + Used to signal an error with the SQL data passed + to a database. + Condition Type + + + Class Precedence List + + + sql-database-data-error + sql-database-error + sql-error + simple-error + simple-condition + error + serious-condition + sql-condition + condition + t + + + + + Description + This condition represents errors that occur while + executing SQL statements, specifically as a result of + malformed SQL expressions. + + + The following initialization arguments and accessors exist: + + + Initarg + Accessor + Description + + :expression + sql-error-expression + The SQL expression whose execution caused the error. + + + :database + sql-error-database + The database object that was involved in the + incident. + + + :error-id + sql-error-error-id + The numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :secondary-error-id + sql-error-secondary-error-id + The secondary numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :message + sql-error-database-message + A string describing the problem that occurred, + possibly one returned by the database back-end. + + + + + Notes + + The slot accessors + sql-error-database and + sql-error-expression are + &clsql; extensions. + + + - - - SQL-TEMPORARY-ERROR - Used to signal a temporary error in the database - backend. - Condition Type - - - Class Precedence List - - - sql-database-error - sql-error - error - serious-condition - sql-condition - condition - t - - - - - Description - This condition represents errors occurring when the - database cannot currently process a valid interaction because, - for example, it is still executing another command possibly - issued by another user. The following initialization arguments - and accessors exist: - - Initarg - Accessor - Description - - :database - sql-database-error-database - The database object that was involved in the - incident. - - - :error-id - sql-error-error-id - The numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :secondary-error-id - sql-error-secondary-error-id - The secondary numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :message - sql-error-database-message - A string describing the problem that occurred, - possibly one returned by the database back-end. - - - - + + + SQL-TEMPORARY-ERROR + + + Condition Type SQL-TEMPORARY-ERROR + Used to signal a temporary error in the database + backend. + Condition Type + + + Class Precedence List + + + sql-temporary-error + sql-database-error + sql-error + simple-error + simple-condition + error + serious-condition + sql-condition + condition + t + + + + + Description + + This condition represents errors occurring when the database + cannot currently process a valid interaction because, for + example, it is still executing another command possibly issued + by another user. + + + The following initialization arguments and accessors exist: + + + Initarg + Accessor + Description + + :database + sql-error-database + The database object that was involved in the + incident. + + + :error-id + sql-error-error-id + The numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :secondary-error-id + sql-error-secondary-error-id + The secondary numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :message + sql-error-database-message + A string describing the problem that occurred, + possibly one returned by the database back-end. + + + + + Notes + + The slot accessor + sql-error-database is a &clsql; + extension. + + + - - - SQL-TIMEOUT-ERROR - condition representing errors when a connection - times out. - Condition Type - - - Class Precedence List - - - sql-connection-error - sql-database-error - sql-error - sql-condition - condition - t - - - - - Description - This condition represents errors that occur when the - database times out while processing some operation. The - following initialization arguments and accessors exist: - - Initarg - Accessor - Description - - :database-type - sql-connection-error-database-type - Database type for the connection attempt - - - :connection-spec - sql-connection-error-connection-spec - The connection specification used in the - connection attempt. - - - :database - sql-database-error-database - The database object that was involved in the - incident. - - - :error-id - sql-error-error-id - The numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :secondary-error-id - sql-error-secondary-error-id - The secondary numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :message - sql-error-database-message - A string describing the problem that occurred, - possibly one returned by the database back-end. - - - - + + + SQL-TIMEOUT-ERROR + + + Condition Type SQL-TIMEOUT-ERROR + condition representing errors when a connection + times out. + Condition Type + + + Class Precedence List + + + sql-connection-error + sql-database-error + sql-error + simple-error + simple-condition + error + serious-condition + sql-condition + condition + t + + + + + Description + This condition represents errors that occur when the + database times out while processing some operation. The + following initialization arguments and accessors exist: + + Initarg + Accessor + Description + + :database-type + sql-error-database-type + Database type for the connection attempt + + + :connection-spec + sql-error-connection-spec + The connection specification used in the + connection attempt. + + + :database + sql-error-database + The database object that was involved in the + incident. + + + :error-id + sql-error-error-id + The numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :secondary-error-id + sql-error-secondary-error-id + The secondary numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :message + sql-error-database-message + A string describing the problem that occurred, + possibly one returned by the database back-end. + + + + + Notes + + The slot accessors + sql-error-database, + sql-error-database-type and + sql-error-connection-spec are + &clsql; extensions. + + + - - - SQL-FATAL-ERROR - condition representing a fatal error in a database - connection - Condition Type - - - Class Precedence List - - - sql-connection-error - sql-database-error - sql-error - sql-condition - condition - t - - - - - Description - This condition represents errors occurring when the - database connection is no longer usable. The following - initialization arguments and accessors exist: - - Initarg - Accessor - Description - - :database-type - sql-connection-error-database-type - Database type for the connection attempt - - - :connection-spec - sql-connection-error-connection-spec - The connection specification used in the - connection attempt. - - - :database - sql-database-error-database - The database object that was involved in the - incident. - - - :error-id - sql-error-error-id - The numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :secondary-error-id - sql-error-secondary-error-id - The secondary numeric or symbolic error specification - returned by the database back-end. The values and - semantics of this are interface specific. - - - :message - sql-error-database-message - A string describing the problem that occurred, - possibly one returned by the database back-end. - - - - - + + + SQL-FATAL-ERROR + + + Condition Type SQL-FATAL-ERROR + condition representing a fatal error in a database + connection + Condition Type + + + Class Precedence List + + + sql-connection-error + sql-database-error + sql-error + simple-error + simple-condition + error + serious-condition + sql-condition + condition + t + + + + + Description + This condition represents errors occurring when the + database connection is no longer usable. + + + The following initialization arguments and accessors exist: + + + Initarg + Accessor + Description + + :database-type + sql-error-database-type + Database type for the connection attempt + + + :connection-spec + sql-error-connection-spec + The connection specification used in the + connection attempt. + + + :database + sql-error-database + The database object that was involved in the + incident. + + + :error-id + sql-error-error-id + The numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :secondary-error-id + sql-error-secondary-error-id + The secondary numeric or symbolic error specification + returned by the database back-end. The values and + semantics of this are interface specific. + + + :message + sql-error-database-message + A string describing the problem that occurred, + possibly one returned by the database back-end. + + + + + Notes + + The slot accessors + sql-error-database, + sql-error-database-type and + sql-error-connection-spec are + &clsql; extensions. + + + +