Skip to main content

diesel/sqlite/connection/
error_information.rs

1use crate::result::DatabaseErrorInformation;
2use alloc::string::String;
3
4/// Error information for a failed SQLite API call.
5pub(in crate::sqlite) struct SqliteErrorInformation {
6    pub(in crate::sqlite) message: String,
7    pub(in crate::sqlite) native_code: i32,
8}
9
10impl DatabaseErrorInformation for SqliteErrorInformation {
11    fn message(&self) -> &str {
12        &self.message
13    }
14
15    fn details(&self) -> Option<&str> {
16        None
17    }
18
19    fn hint(&self) -> Option<&str> {
20        None
21    }
22
23    fn table_name(&self) -> Option<&str> {
24        None
25    }
26
27    fn column_name(&self) -> Option<&str> {
28        None
29    }
30
31    fn constraint_name(&self) -> Option<&str> {
32        None
33    }
34
35    fn statement_position(&self) -> Option<i32> {
36        None
37    }
38
39    fn native_code(&self) -> Option<i32> {
40        Some(self.native_code)
41    }
42}