glite/error
Errors returned by glite.
Types
The kind of constraint that failed.
pub type ConstraintKind {
Unique
PrimaryKey
ForeignKey
Check
NotNull
OtherConstraint
}
Constructors
-
Unique -
PrimaryKey -
ForeignKey -
Check -
NotNull -
OtherConstraint
Everything that can go wrong in a glite call.
pub type Error {
Constraint(kind: ConstraintKind, message: String)
Busy(message: String)
Timeout(after_ms: Int)
Sqlite(
code: Int,
extended_code: Int,
message: String,
offset: Int,
)
InvalidSql(message: String)
Encode(message: String)
Decode(message: String, row: Int, column: Int)
RowLimitExceeded(limit: Int)
BatchLimitExceeded(limit: Int)
Overloaded(queue_limit: Int)
PragmaMismatch(pragma: String, wanted: String, got: String)
InvalidConfig(message: String)
Backup(message: String)
ConnectionClosed
}
Constructors
-
Constraint(kind: ConstraintKind, message: String)A constraint stopped the statement.
-
Busy(message: String)The database stayed locked by another connection for longer than the configured busy timeout.
-
Timeout(after_ms: Int)The call took longer than the configured call timeout. The running statement was interrupted and nothing it did was committed.
-
Sqlite( code: Int, extended_code: Int, message: String, offset: Int, )Any other SQLite error.
codeis the primary result code,extended_codethe extended one, andoffsetthe byte offset in the SQL the error points at, or -1. -
InvalidSql(message: String)The SQL is empty, or holds more than one statement. Use
exec_scriptto run several statements. -
Encode(message: String)The parameters don’t fit the statement: the wrong number of them, or an integer outside SQLite’s 64-bit range.
-
Decode(message: String, row: Int, column: Int)A row didn’t match its decoder.
rowandcolumncount from 0. -
RowLimitExceeded(limit: Int)A query returned more rows than the configured
max_rows. No rows are returned: a result is never silently cut short. -
BatchLimitExceeded(limit: Int)An
exec_manycall had more parameter sets than the configuredmax_batch. -
Overloaded(queue_limit: Int)The connection already had the configured
max_queuecalls waiting. -
PragmaMismatch(pragma: String, wanted: String, got: String)A setting applied when opening the database didn’t take effect: SQLite reported
gotafter glite asked forwanted. -
InvalidConfig(message: String)The configuration is not valid.
-
Backup(message: String)A backup could not be made or did not pass its integrity check.
-
ConnectionClosedThe connection is closed, or its actor has stopped.