Skip to main content

Crate sqlstate

Crate sqlstate 

Source
Expand description

§sqlstate

Crates.io Documentation

SQLSTATE codes with PostgreSQL, MySQL and MariaDB constants.

let code: sqlstate::SqlState = "40001".parse().unwrap();
assert!(matches!(code, sqlstate::pg::T_R_SERIALIZATION_FAILURE));

Modules§

mysql_like
The SQLSTATE codes MySQL 8.4 and MariaDB 11.8 report, taken from messages_to_clients.txt and errmsg-utf8.txt.
pg
The SQLSTATE codes PostgreSQL defines, as listed in its documentation and taken from errcodes.txt.

Structs§

InvalidSqlState
The error parsing a SqlState from a string that is not five characters from 0-9 and A-Z.
SqlState
A SQLSTATE error code, including custom codes outside the standard, usable as a match pattern.
SqlStateClass
The class of a SqlState, with a constant for each class SQL:2011 defines.