logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tdbc::mapSqlState - Map SQLSTATE to error class

Description

       The  tdbc::mapSqlState  command  accepts  a string that is expected to be a five-character 'SQL state' as
       returned from a SQL database when an error occurs. It examines the first two characters  of  the  string,
       and  returns  an  error  class as a human- and machine-readable name (for example, FEATURE_NOT_SUPPORTED,
       DATA_EXCEPTION or INVALID_CURSOR_STATE).

       The TDBC specification requires database drivers to return a description of an error in  the  error  code
       when  an  error  occurs.  The  description  is a string that has at least four elements: "TDBCerrorClasssqlstatedriverNamedetails...". The tdbc::mapSqlState command gives a convenient way for a  TDBC  driver
       to generate the errorClass element given the SQL state returned from a database.

Keywords

       TDBC, SQL, database, state

Name

       tdbc::mapSqlState - Map SQLSTATE to error class

See Also

tdbc(3tcl), tdbc::tokenize, tdbc::connection(3tcl), tdbc::statement(3tcl), tdbc::resultset(3tcl)

Synopsis

       package require tdbc1.0tdbc::mapSqlStatesqlstate
________________________________________________________________________________________________________________

See Also