pub struct DiagnosticResult {
pub state: State,
pub native_error: i32,
pub text_length: i16,
}Expand description
Result of Diagnostics::diagnostic_record.
Fields§
§state: StateA five-character SQLSTATE code (and terminating NULL) for the diagnostic record
rec_number. The first two characters indicate the class; the next three indicate the
subclass. For more information, see
SQLSTATEs.
native_error: i32Native error code specific to the data source.
text_length: i16The length of the diagnostic message reported by ODBC. This is supposed to be the size in
characters (excluding the terminating zero). For narrow encodings this is the size in bytes;
For wide encodings this is the size in 16-bit double words. Some drivers however report
larger values (e.g. they add additional padding \0 bytes to the message and include the
padding in the length). Other drivers (IBM i Access ODBC driver, see
issue #898 underreport the text length.
They report only one “character” for each UTF-8 code point even if they consist of multiple
bytes.
Trait Implementations§
Source§impl Clone for DiagnosticResult
impl Clone for DiagnosticResult
Source§fn clone(&self) -> DiagnosticResult
fn clone(&self) -> DiagnosticResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more