Skip to main content

SqlState

Struct SqlState 

Source
pub struct SqlState(/* private fields */);
Expand description

A SQLSTATE: five ASCII characters, each a digit or an upper case letter.

The first two characters are the class. A client that does not know a code can still act on its class, which is why a code that rupg cannot give exactly must at least be in the right class.

Implementations§

Source§

impl SqlState

Source

pub const SUCCESSFUL_COMPLETION: Self

00000, condition successful_completion.

Source

pub const WARNING: Self

01000, condition warning.

Source

pub const WARNING_DYNAMIC_RESULT_SETS_RETURNED: Self

0100C, condition dynamic_result_sets_returned.

Source

pub const WARNING_IMPLICIT_ZERO_BIT_PADDING: Self

01008, condition implicit_zero_bit_padding.

Source

pub const WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION: Self

01003, condition null_value_eliminated_in_set_function.

Source

pub const WARNING_PRIVILEGE_NOT_GRANTED: Self

01007, condition privilege_not_granted.

Source

pub const WARNING_PRIVILEGE_NOT_REVOKED: Self

01006, condition privilege_not_revoked.

Source

pub const WARNING_STRING_DATA_RIGHT_TRUNCATION: Self

01004, condition string_data_right_truncation.

Source

pub const WARNING_DEPRECATED_FEATURE: Self

01P01, condition deprecated_feature.

Source

pub const NO_DATA: Self

02000, condition no_data.

Source

pub const NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED: Self

02001, condition no_additional_dynamic_result_sets_returned.

Source

pub const SQL_STATEMENT_NOT_YET_COMPLETE: Self

03000, condition sql_statement_not_yet_complete.

Source

pub const CONNECTION_EXCEPTION: Self

08000, condition connection_exception.

Source

pub const CONNECTION_DOES_NOT_EXIST: Self

08003, condition connection_does_not_exist.

Source

pub const CONNECTION_FAILURE: Self

08006, condition connection_failure.

Source

pub const SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION: Self

08001, condition sqlclient_unable_to_establish_sqlconnection.

Source

pub const SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION: Self

08004, condition sqlserver_rejected_establishment_of_sqlconnection.

Source

pub const TRANSACTION_RESOLUTION_UNKNOWN: Self

08007, condition transaction_resolution_unknown.

Source

pub const PROTOCOL_VIOLATION: Self

08P01, condition protocol_violation.

Source

pub const TRIGGERED_ACTION_EXCEPTION: Self

09000, condition triggered_action_exception.

Source

pub const FEATURE_NOT_SUPPORTED: Self

0A000, condition feature_not_supported.

Source

pub const INVALID_TRANSACTION_INITIATION: Self

0B000, condition invalid_transaction_initiation.

Source

pub const LOCATOR_EXCEPTION: Self

0F000, condition locator_exception.

Source

pub const L_E_INVALID_SPECIFICATION: Self

0F001, condition invalid_locator_specification.

Source

pub const INVALID_GRANTOR: Self

0L000, condition invalid_grantor.

Source

pub const INVALID_GRANT_OPERATION: Self

0LP01, condition invalid_grant_operation.

Source

pub const INVALID_ROLE_SPECIFICATION: Self

0P000, condition invalid_role_specification.

Source

pub const DIAGNOSTICS_EXCEPTION: Self

0Z000, condition diagnostics_exception.

Source

pub const STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER: Self

0Z002, condition stacked_diagnostics_accessed_without_active_handler.

Source

pub const INVALID_ARGUMENT_FOR_XQUERY: Self

10608, condition invalid_argument_for_xquery.

Source

pub const CASE_NOT_FOUND: Self

20000, condition case_not_found.

Source

pub const CARDINALITY_VIOLATION: Self

21000, condition cardinality_violation.

Source

pub const DATA_EXCEPTION: Self

22000, condition data_exception.

Source

pub const ARRAY_ELEMENT_ERROR: Self

2202E, a second name for this code.

Source

pub const ARRAY_SUBSCRIPT_ERROR: Self

2202E, condition array_subscript_error.

Source

pub const CHARACTER_NOT_IN_REPERTOIRE: Self

22021, condition character_not_in_repertoire.

Source

pub const DATETIME_FIELD_OVERFLOW: Self

22008, condition datetime_field_overflow.

Source

pub const DATETIME_VALUE_OUT_OF_RANGE: Self

22008, a second name for this code.

Source

pub const DIVISION_BY_ZERO: Self

22012, condition division_by_zero.

Source

pub const ERROR_IN_ASSIGNMENT: Self

22005, condition error_in_assignment.

Source

pub const ESCAPE_CHARACTER_CONFLICT: Self

2200B, condition escape_character_conflict.

Source

pub const INDICATOR_OVERFLOW: Self

22022, condition indicator_overflow.

Source

pub const INTERVAL_FIELD_OVERFLOW: Self

22015, condition interval_field_overflow.

Source

pub const INVALID_ARGUMENT_FOR_LOG: Self

2201E, condition invalid_argument_for_logarithm.

Source

pub const INVALID_ARGUMENT_FOR_NTILE: Self

22014, condition invalid_argument_for_ntile_function.

Source

pub const INVALID_ARGUMENT_FOR_NTH_VALUE: Self

22016, condition invalid_argument_for_nth_value_function.

Source

pub const INVALID_ARGUMENT_FOR_POWER_FUNCTION: Self

2201F, condition invalid_argument_for_power_function.

Source

pub const INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION: Self

2201G, condition invalid_argument_for_width_bucket_function.

Source

pub const INVALID_CHARACTER_VALUE_FOR_CAST: Self

22018, condition invalid_character_value_for_cast.

Source

pub const INVALID_DATETIME_FORMAT: Self

22007, condition invalid_datetime_format.

Source

pub const INVALID_ESCAPE_CHARACTER: Self

22019, condition invalid_escape_character.

Source

pub const INVALID_ESCAPE_OCTET: Self

2200D, condition invalid_escape_octet.

Source

pub const INVALID_ESCAPE_SEQUENCE: Self

22025, condition invalid_escape_sequence.

Source

pub const NONSTANDARD_USE_OF_ESCAPE_CHARACTER: Self

22P06, condition nonstandard_use_of_escape_character.

Source

pub const INVALID_INDICATOR_PARAMETER_VALUE: Self

22010, condition invalid_indicator_parameter_value.

Source

pub const INVALID_PARAMETER_VALUE: Self

22023, condition invalid_parameter_value.

Source

pub const INVALID_PRECEDING_OR_FOLLOWING_SIZE: Self

22013, condition invalid_preceding_or_following_size.

Source

pub const INVALID_REGULAR_EXPRESSION: Self

2201B, condition invalid_regular_expression.

Source

pub const INVALID_ROW_COUNT_IN_LIMIT_CLAUSE: Self

2201W, condition invalid_row_count_in_limit_clause.

Source

pub const INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE: Self

2201X, condition invalid_row_count_in_result_offset_clause.

Source

pub const INVALID_TABLESAMPLE_ARGUMENT: Self

2202H, condition invalid_tablesample_argument.

Source

pub const INVALID_TABLESAMPLE_REPEAT: Self

2202G, condition invalid_tablesample_repeat.

Source

pub const INVALID_TIME_ZONE_DISPLACEMENT_VALUE: Self

22009, condition invalid_time_zone_displacement_value.

Source

pub const INVALID_USE_OF_ESCAPE_CHARACTER: Self

2200C, condition invalid_use_of_escape_character.

Source

pub const MOST_SPECIFIC_TYPE_MISMATCH: Self

2200G, condition most_specific_type_mismatch.

Source

pub const NULL_VALUE_NOT_ALLOWED: Self

22004, condition null_value_not_allowed.

Source

pub const NULL_VALUE_NO_INDICATOR_PARAMETER: Self

22002, condition null_value_no_indicator_parameter.

Source

pub const NUMERIC_VALUE_OUT_OF_RANGE: Self

22003, condition numeric_value_out_of_range.

Source

pub const SEQUENCE_GENERATOR_LIMIT_EXCEEDED: Self

2200H, condition sequence_generator_limit_exceeded.

Source

pub const STRING_DATA_LENGTH_MISMATCH: Self

22026, condition string_data_length_mismatch.

Source

pub const STRING_DATA_RIGHT_TRUNCATION: Self

22001, condition string_data_right_truncation.

Source

pub const SUBSTRING_ERROR: Self

22011, condition substring_error.

Source

pub const TRIM_ERROR: Self

22027, condition trim_error.

Source

pub const UNTERMINATED_C_STRING: Self

22024, condition unterminated_c_string.

Source

pub const ZERO_LENGTH_CHARACTER_STRING: Self

2200F, condition zero_length_character_string.

Source

pub const FLOATING_POINT_EXCEPTION: Self

22P01, condition floating_point_exception.

Source

pub const INVALID_TEXT_REPRESENTATION: Self

22P02, condition invalid_text_representation.

Source

pub const INVALID_BINARY_REPRESENTATION: Self

22P03, condition invalid_binary_representation.

Source

pub const BAD_COPY_FILE_FORMAT: Self

22P04, condition bad_copy_file_format.

Source

pub const UNTRANSLATABLE_CHARACTER: Self

22P05, condition untranslatable_character.

Source

pub const NOT_AN_XML_DOCUMENT: Self

2200L, condition not_an_xml_document.

Source

pub const INVALID_XML_DOCUMENT: Self

2200M, condition invalid_xml_document.

Source

pub const INVALID_XML_CONTENT: Self

2200N, condition invalid_xml_content.

Source

pub const INVALID_XML_COMMENT: Self

2200S, condition invalid_xml_comment.

Source

pub const INVALID_XML_PROCESSING_INSTRUCTION: Self

2200T, condition invalid_xml_processing_instruction.

Source

pub const DUPLICATE_JSON_OBJECT_KEY_VALUE: Self

22030, condition duplicate_json_object_key_value.

Source

pub const INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION: Self

22031, condition invalid_argument_for_sql_json_datetime_function.

Source

pub const INVALID_JSON_TEXT: Self

22032, condition invalid_json_text.

Source

pub const INVALID_SQL_JSON_SUBSCRIPT: Self

22033, condition invalid_sql_json_subscript.

Source

pub const MORE_THAN_ONE_SQL_JSON_ITEM: Self

22034, condition more_than_one_sql_json_item.

Source

pub const NO_SQL_JSON_ITEM: Self

22035, condition no_sql_json_item.

Source

pub const NON_NUMERIC_SQL_JSON_ITEM: Self

22036, condition non_numeric_sql_json_item.

Source

pub const NON_UNIQUE_KEYS_IN_A_JSON_OBJECT: Self

22037, condition non_unique_keys_in_a_json_object.

Source

pub const SINGLETON_SQL_JSON_ITEM_REQUIRED: Self

22038, condition singleton_sql_json_item_required.

Source

pub const SQL_JSON_ARRAY_NOT_FOUND: Self

22039, condition sql_json_array_not_found.

Source

pub const SQL_JSON_MEMBER_NOT_FOUND: Self

2203A, condition sql_json_member_not_found.

Source

pub const SQL_JSON_NUMBER_NOT_FOUND: Self

2203B, condition sql_json_number_not_found.

Source

pub const SQL_JSON_OBJECT_NOT_FOUND: Self

2203C, condition sql_json_object_not_found.

Source

pub const TOO_MANY_JSON_ARRAY_ELEMENTS: Self

2203D, condition too_many_json_array_elements.

Source

pub const TOO_MANY_JSON_OBJECT_MEMBERS: Self

2203E, condition too_many_json_object_members.

Source

pub const SQL_JSON_SCALAR_REQUIRED: Self

2203F, condition sql_json_scalar_required.

Source

pub const SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE: Self

2203G, condition sql_json_item_cannot_be_cast_to_target_type.

Source

pub const INTEGRITY_CONSTRAINT_VIOLATION: Self

23000, condition integrity_constraint_violation.

Source

pub const RESTRICT_VIOLATION: Self

23001, condition restrict_violation.

Source

pub const NOT_NULL_VIOLATION: Self

23502, condition not_null_violation.

Source

pub const FOREIGN_KEY_VIOLATION: Self

23503, condition foreign_key_violation.

Source

pub const UNIQUE_VIOLATION: Self

23505, condition unique_violation.

Source

pub const CHECK_VIOLATION: Self

23514, condition check_violation.

Source

pub const EXCLUSION_VIOLATION: Self

23P01, condition exclusion_violation.

Source

pub const INVALID_CURSOR_STATE: Self

24000, condition invalid_cursor_state.

Source

pub const INVALID_TRANSACTION_STATE: Self

25000, condition invalid_transaction_state.

Source

pub const ACTIVE_SQL_TRANSACTION: Self

25001, condition active_sql_transaction.

Source

pub const BRANCH_TRANSACTION_ALREADY_ACTIVE: Self

25002, condition branch_transaction_already_active.

Source

pub const HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL: Self

25008, condition held_cursor_requires_same_isolation_level.

Source

pub const INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION: Self

25003, condition inappropriate_access_mode_for_branch_transaction.

Source

pub const INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION: Self

25004, condition inappropriate_isolation_level_for_branch_transaction.

Source

pub const NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION: Self

25005, condition no_active_sql_transaction_for_branch_transaction.

Source

pub const READ_ONLY_SQL_TRANSACTION: Self

25006, condition read_only_sql_transaction.

Source

pub const SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED: Self

25007, condition schema_and_data_statement_mixing_not_supported.

Source

pub const NO_ACTIVE_SQL_TRANSACTION: Self

25P01, condition no_active_sql_transaction.

Source

pub const IN_FAILED_SQL_TRANSACTION: Self

25P02, condition in_failed_sql_transaction.

Source

pub const IDLE_IN_TRANSACTION_SESSION_TIMEOUT: Self

25P03, condition idle_in_transaction_session_timeout.

Source

pub const TRANSACTION_TIMEOUT: Self

25P04, condition transaction_timeout.

Source

pub const INVALID_SQL_STATEMENT_NAME: Self

26000, condition invalid_sql_statement_name.

Source

pub const TRIGGERED_DATA_CHANGE_VIOLATION: Self

27000, condition triggered_data_change_violation.

Source

pub const INVALID_AUTHORIZATION_SPECIFICATION: Self

28000, condition invalid_authorization_specification.

Source

pub const INVALID_PASSWORD: Self

28P01, condition invalid_password.

Source

pub const DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST: Self

2B000, condition dependent_privilege_descriptors_still_exist.

Source

pub const DEPENDENT_OBJECTS_STILL_EXIST: Self

2BP01, condition dependent_objects_still_exist.

Source

pub const INVALID_TRANSACTION_TERMINATION: Self

2D000, condition invalid_transaction_termination.

Source

pub const SQL_ROUTINE_EXCEPTION: Self

2F000, condition sql_routine_exception.

Source

pub const S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT: Self

2F005, condition function_executed_no_return_statement.

Source

pub const S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED: Self

2F002, condition modifying_sql_data_not_permitted.

Source

pub const S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED: Self

2F003, condition prohibited_sql_statement_attempted.

Source

pub const S_R_E_READING_SQL_DATA_NOT_PERMITTED: Self

2F004, condition reading_sql_data_not_permitted.

Source

pub const INVALID_CURSOR_NAME: Self

34000, condition invalid_cursor_name.

Source

pub const EXTERNAL_ROUTINE_EXCEPTION: Self

38000, condition external_routine_exception.

Source

pub const E_R_E_CONTAINING_SQL_NOT_PERMITTED: Self

38001, condition containing_sql_not_permitted.

Source

pub const E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED: Self

38002, condition modifying_sql_data_not_permitted.

Source

pub const E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED: Self

38003, condition prohibited_sql_statement_attempted.

Source

pub const E_R_E_READING_SQL_DATA_NOT_PERMITTED: Self

38004, condition reading_sql_data_not_permitted.

Source

pub const EXTERNAL_ROUTINE_INVOCATION_EXCEPTION: Self

39000, condition external_routine_invocation_exception.

Source

pub const E_R_I_E_INVALID_SQLSTATE_RETURNED: Self

39001, condition invalid_sqlstate_returned.

Source

pub const E_R_I_E_NULL_VALUE_NOT_ALLOWED: Self

39004, condition null_value_not_allowed.

Source

pub const E_R_I_E_TRIGGER_PROTOCOL_VIOLATED: Self

39P01, condition trigger_protocol_violated.

Source

pub const E_R_I_E_SRF_PROTOCOL_VIOLATED: Self

39P02, condition srf_protocol_violated.

Source

pub const E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED: Self

39P03, condition event_trigger_protocol_violated.

Source

pub const SAVEPOINT_EXCEPTION: Self

3B000, condition savepoint_exception.

Source

pub const S_E_INVALID_SPECIFICATION: Self

3B001, condition invalid_savepoint_specification.

Source

pub const INVALID_CATALOG_NAME: Self

3D000, condition invalid_catalog_name.

Source

pub const INVALID_SCHEMA_NAME: Self

3F000, condition invalid_schema_name.

Source

pub const TRANSACTION_ROLLBACK: Self

40000, condition transaction_rollback.

Source

pub const T_R_INTEGRITY_CONSTRAINT_VIOLATION: Self

40002, condition transaction_integrity_constraint_violation.

Source

pub const T_R_SERIALIZATION_FAILURE: Self

40001, condition serialization_failure.

Source

pub const T_R_STATEMENT_COMPLETION_UNKNOWN: Self

40003, condition statement_completion_unknown.

Source

pub const T_R_DEADLOCK_DETECTED: Self

40P01, condition deadlock_detected.

Source

pub const SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION: Self

42000, condition syntax_error_or_access_rule_violation.

Source

pub const SYNTAX_ERROR: Self

42601, condition syntax_error.

Source

pub const INSUFFICIENT_PRIVILEGE: Self

42501, condition insufficient_privilege.

Source

pub const CANNOT_COERCE: Self

42846, condition cannot_coerce.

Source

pub const GROUPING_ERROR: Self

42803, condition grouping_error.

Source

pub const WINDOWING_ERROR: Self

42P20, condition windowing_error.

Source

pub const INVALID_RECURSION: Self

42P19, condition invalid_recursion.

Source

pub const INVALID_FOREIGN_KEY: Self

42830, condition invalid_foreign_key.

Source

pub const INVALID_NAME: Self

42602, condition invalid_name.

Source

pub const NAME_TOO_LONG: Self

42622, condition name_too_long.

Source

pub const RESERVED_NAME: Self

42939, condition reserved_name.

Source

pub const DATATYPE_MISMATCH: Self

42804, condition datatype_mismatch.

Source

pub const INDETERMINATE_DATATYPE: Self

42P18, condition indeterminate_datatype.

Source

pub const COLLATION_MISMATCH: Self

42P21, condition collation_mismatch.

Source

pub const INDETERMINATE_COLLATION: Self

42P22, condition indeterminate_collation.

Source

pub const WRONG_OBJECT_TYPE: Self

42809, condition wrong_object_type.

Source

pub const GENERATED_ALWAYS: Self

428C9, condition generated_always.

Source

pub const UNDEFINED_COLUMN: Self

42703, condition undefined_column.

Source

pub const UNDEFINED_CURSOR: Self

34000, a second name for this code.

Source

pub const UNDEFINED_DATABASE: Self

3D000, a second name for this code.

Source

pub const UNDEFINED_FUNCTION: Self

42883, condition undefined_function.

Source

pub const UNDEFINED_PSTATEMENT: Self

26000, a second name for this code.

Source

pub const UNDEFINED_SCHEMA: Self

3F000, a second name for this code.

Source

pub const UNDEFINED_TABLE: Self

42P01, condition undefined_table.

Source

pub const UNDEFINED_PARAMETER: Self

42P02, condition undefined_parameter.

Source

pub const UNDEFINED_OBJECT: Self

42704, condition undefined_object.

Source

pub const DUPLICATE_COLUMN: Self

42701, condition duplicate_column.

Source

pub const DUPLICATE_CURSOR: Self

42P03, condition duplicate_cursor.

Source

pub const DUPLICATE_DATABASE: Self

42P04, condition duplicate_database.

Source

pub const DUPLICATE_FUNCTION: Self

42723, condition duplicate_function.

Source

pub const DUPLICATE_PSTATEMENT: Self

42P05, condition duplicate_prepared_statement.

Source

pub const DUPLICATE_SCHEMA: Self

42P06, condition duplicate_schema.

Source

pub const DUPLICATE_TABLE: Self

42P07, condition duplicate_table.

Source

pub const DUPLICATE_ALIAS: Self

42712, condition duplicate_alias.

Source

pub const DUPLICATE_OBJECT: Self

42710, condition duplicate_object.

Source

pub const AMBIGUOUS_COLUMN: Self

42702, condition ambiguous_column.

Source

pub const AMBIGUOUS_FUNCTION: Self

42725, condition ambiguous_function.

Source

pub const AMBIGUOUS_PARAMETER: Self

42P08, condition ambiguous_parameter.

Source

pub const AMBIGUOUS_ALIAS: Self

42P09, condition ambiguous_alias.

Source

pub const INVALID_COLUMN_REFERENCE: Self

42P10, condition invalid_column_reference.

Source

pub const INVALID_COLUMN_DEFINITION: Self

42611, condition invalid_column_definition.

Source

pub const INVALID_CURSOR_DEFINITION: Self

42P11, condition invalid_cursor_definition.

Source

pub const INVALID_DATABASE_DEFINITION: Self

42P12, condition invalid_database_definition.

Source

pub const INVALID_FUNCTION_DEFINITION: Self

42P13, condition invalid_function_definition.

Source

pub const INVALID_PSTATEMENT_DEFINITION: Self

42P14, condition invalid_prepared_statement_definition.

Source

pub const INVALID_SCHEMA_DEFINITION: Self

42P15, condition invalid_schema_definition.

Source

pub const INVALID_TABLE_DEFINITION: Self

42P16, condition invalid_table_definition.

Source

pub const INVALID_OBJECT_DEFINITION: Self

42P17, condition invalid_object_definition.

Source

pub const WITH_CHECK_OPTION_VIOLATION: Self

44000, condition with_check_option_violation.

Source

pub const INSUFFICIENT_RESOURCES: Self

53000, condition insufficient_resources.

Source

pub const DISK_FULL: Self

53100, condition disk_full.

Source

pub const OUT_OF_MEMORY: Self

53200, condition out_of_memory.

Source

pub const TOO_MANY_CONNECTIONS: Self

53300, condition too_many_connections.

Source

pub const CONFIGURATION_LIMIT_EXCEEDED: Self

53400, condition configuration_limit_exceeded.

Source

pub const PROGRAM_LIMIT_EXCEEDED: Self

54000, condition program_limit_exceeded.

Source

pub const STATEMENT_TOO_COMPLEX: Self

54001, condition statement_too_complex.

Source

pub const TOO_MANY_COLUMNS: Self

54011, condition too_many_columns.

Source

pub const TOO_MANY_ARGUMENTS: Self

54023, condition too_many_arguments.

Source

pub const OBJECT_NOT_IN_PREREQUISITE_STATE: Self

55000, condition object_not_in_prerequisite_state.

Source

pub const OBJECT_IN_USE: Self

55006, condition object_in_use.

Source

pub const CANT_CHANGE_RUNTIME_PARAM: Self

55P02, condition cant_change_runtime_param.

Source

pub const LOCK_NOT_AVAILABLE: Self

55P03, condition lock_not_available.

Source

pub const UNSAFE_NEW_ENUM_VALUE_USAGE: Self

55P04, condition unsafe_new_enum_value_usage.

Source

pub const OPERATOR_INTERVENTION: Self

57000, condition operator_intervention.

Source

pub const QUERY_CANCELED: Self

57014, condition query_canceled.

Source

pub const ADMIN_SHUTDOWN: Self

57P01, condition admin_shutdown.

Source

pub const CRASH_SHUTDOWN: Self

57P02, condition crash_shutdown.

Source

pub const CANNOT_CONNECT_NOW: Self

57P03, condition cannot_connect_now.

Source

pub const DATABASE_DROPPED: Self

57P04, condition database_dropped.

Source

pub const IDLE_SESSION_TIMEOUT: Self

57P05, condition idle_session_timeout.

Source

pub const SYSTEM_ERROR: Self

58000, condition system_error.

Source

pub const IO_ERROR: Self

58030, condition io_error.

Source

pub const UNDEFINED_FILE: Self

58P01, condition undefined_file.

Source

pub const DUPLICATE_FILE: Self

58P02, condition duplicate_file.

Source

pub const FILE_NAME_TOO_LONG: Self

58P03, condition file_name_too_long.

Source

pub const CONFIG_FILE_ERROR: Self

F0000, condition config_file_error.

Source

pub const LOCK_FILE_EXISTS: Self

F0001, condition lock_file_exists.

Source

pub const FDW_ERROR: Self

HV000, condition fdw_error.

Source

pub const FDW_COLUMN_NAME_NOT_FOUND: Self

HV005, condition fdw_column_name_not_found.

Source

pub const FDW_DYNAMIC_PARAMETER_VALUE_NEEDED: Self

HV002, condition fdw_dynamic_parameter_value_needed.

Source

pub const FDW_FUNCTION_SEQUENCE_ERROR: Self

HV010, condition fdw_function_sequence_error.

Source

pub const FDW_INCONSISTENT_DESCRIPTOR_INFORMATION: Self

HV021, condition fdw_inconsistent_descriptor_information.

Source

pub const FDW_INVALID_ATTRIBUTE_VALUE: Self

HV024, condition fdw_invalid_attribute_value.

Source

pub const FDW_INVALID_COLUMN_NAME: Self

HV007, condition fdw_invalid_column_name.

Source

pub const FDW_INVALID_COLUMN_NUMBER: Self

HV008, condition fdw_invalid_column_number.

Source

pub const FDW_INVALID_DATA_TYPE: Self

HV004, condition fdw_invalid_data_type.

Source

pub const FDW_INVALID_DATA_TYPE_DESCRIPTORS: Self

HV006, condition fdw_invalid_data_type_descriptors.

Source

pub const FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER: Self

HV091, condition fdw_invalid_descriptor_field_identifier.

Source

pub const FDW_INVALID_HANDLE: Self

HV00B, condition fdw_invalid_handle.

Source

pub const FDW_INVALID_OPTION_INDEX: Self

HV00C, condition fdw_invalid_option_index.

Source

pub const FDW_INVALID_OPTION_NAME: Self

HV00D, condition fdw_invalid_option_name.

Source

pub const FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH: Self

HV090, condition fdw_invalid_string_length_or_buffer_length.

Source

pub const FDW_INVALID_STRING_FORMAT: Self

HV00A, condition fdw_invalid_string_format.

Source

pub const FDW_INVALID_USE_OF_NULL_POINTER: Self

HV009, condition fdw_invalid_use_of_null_pointer.

Source

pub const FDW_TOO_MANY_HANDLES: Self

HV014, condition fdw_too_many_handles.

Source

pub const FDW_OUT_OF_MEMORY: Self

HV001, condition fdw_out_of_memory.

Source

pub const FDW_NO_SCHEMAS: Self

HV00P, condition fdw_no_schemas.

Source

pub const FDW_OPTION_NAME_NOT_FOUND: Self

HV00J, condition fdw_option_name_not_found.

Source

pub const FDW_REPLY_HANDLE: Self

HV00K, condition fdw_reply_handle.

Source

pub const FDW_SCHEMA_NOT_FOUND: Self

HV00Q, condition fdw_schema_not_found.

Source

pub const FDW_TABLE_NOT_FOUND: Self

HV00R, condition fdw_table_not_found.

Source

pub const FDW_UNABLE_TO_CREATE_EXECUTION: Self

HV00L, condition fdw_unable_to_create_execution.

Source

pub const FDW_UNABLE_TO_CREATE_REPLY: Self

HV00M, condition fdw_unable_to_create_reply.

Source

pub const FDW_UNABLE_TO_ESTABLISH_CONNECTION: Self

HV00N, condition fdw_unable_to_establish_connection.

Source

pub const PLPGSQL_ERROR: Self

P0000, condition plpgsql_error.

Source

pub const RAISE_EXCEPTION: Self

P0001, condition raise_exception.

Source

pub const NO_DATA_FOUND: Self

P0002, condition no_data_found.

Source

pub const TOO_MANY_ROWS: Self

P0003, condition too_many_rows.

Source

pub const ASSERT_FAILURE: Self

P0004, condition assert_failure.

Source

pub const INTERNAL_ERROR: Self

XX000, condition internal_error.

Source

pub const DATA_CORRUPTED: Self

XX001, condition data_corrupted.

Source

pub const INDEX_CORRUPTED: Self

XX002, condition index_corrupted.

Source§

impl SqlState

Source

pub fn parse(text: &str) -> Option<Self>

Reads a code from text. Any five digits or upper case letters make a code, also one that is not in the list, because a client can send any code in RAISE ... USING ERRCODE.

Source

pub fn as_str(&self) -> &str

The code as text, for example 42P01.

Source

pub fn class(&self) -> &str

The class, which is the first two characters, for example 42.

Source

pub fn class_title(self) -> Option<&'static str>

The title of the class in errcodes.txt, for example Syntax Error or Access Rule Violation. None for a class that the file does not have.

Source

pub fn category(self) -> Category

Whether the statement succeeded, succeeded with a warning or failed. A code that is not in the list takes the category of its class, as in PostgreSQL.

Source

pub fn name(self) -> Option<&'static str>

The name of the constant for this code, for example UNDEFINED_TABLE. When a code has two names, this is the first one in the file. None for a code that is not in the list.

Source

pub fn condition(self) -> Option<&'static str>

The PL/pgSQL condition name, for example undefined_table. None for a code that is not in the list.

Source

pub fn for_condition(name: &str) -> impl Iterator<Item = Self> + '_

Every code with this PL/pgSQL condition name. Most names have one code. Five names have two, for example string_data_right_truncation is both 01004 and 22001, and an exception handler for the name catches both.

Source

pub fn all() -> impl Iterator<Item = (Self, &'static str)>

Every code line of errcodes.txt in file order, as the code and the constant name.

Trait Implementations§

Source§

impl Clone for SqlState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SqlState

Source§

impl Debug for SqlState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SqlState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SqlState

Source§

impl Hash for SqlState

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for SqlState

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for SqlState

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for SqlState

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for SqlState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.