Skip to main content

parse_error_code

Function parse_error_code 

Source
fn parse_error_code(err: &ParseError) -> SqlState
Expand description

Maps a parse/cast ParseError to the appropriate DATA_EXCEPTION (class 22) SQLSTATE. Out-of-range values map to overflow codes and malformed input maps to invalid-representation codes, in both cases distinguishing datetime types from everything else, matching PostgreSQL.