pub struct SqlCompilerMessage {
pub end_column: u64,
pub end_line_number: u64,
pub error_type: String,
pub message: String,
pub snippet: Option<String>,
pub start_column: u64,
pub start_line_number: u64,
pub warning: bool,
}
Expand description
A SQL compiler error.
The SQL compiler returns a list of errors in the following JSON format if
it’s invoked with the -je
option.
ⓘ
[ {
"start_line_number" : 2,
"start_column" : 4,
"end_line_number" : 2,
"end_column" : 8,
"warning" : false,
"error_type" : "PRIMARY KEY cannot be nullable",
"message" : "PRIMARY KEY column 'C' has type INTEGER, which is nullable",
"snippet" : " 2| c INT PRIMARY KEY\n ^^^^^\n 3|);\n"
} ]
JSON schema
{
"description": "A SQL compiler error.\n\nThe SQL compiler returns a list of errors in the following JSON format if\nit's invoked with the `-je` option.\n\n```ignore\n[ {\n\"start_line_number\" : 2,\n\"start_column\" : 4,\n\"end_line_number\" : 2,\n\"end_column\" : 8,\n\"warning\" : false,\n\"error_type\" : \"PRIMARY KEY cannot be nullable\",\n\"message\" : \"PRIMARY KEY column 'C' has type INTEGER, which is nullable\",\n\"snippet\" : \" 2| c INT PRIMARY KEY\\n ^^^^^\\n 3|);\\n\"\n} ]\n```",
"type": "object",
"required": [
"end_column",
"end_line_number",
"error_type",
"message",
"start_column",
"start_line_number",
"warning"
],
"properties": {
"end_column": {
"type": "integer",
"minimum": 0.0
},
"end_line_number": {
"type": "integer",
"minimum": 0.0
},
"error_type": {
"type": "string"
},
"message": {
"type": "string"
},
"snippet": {
"type": [
"string",
"null"
]
},
"start_column": {
"type": "integer",
"minimum": 0.0
},
"start_line_number": {
"type": "integer",
"minimum": 0.0
},
"warning": {
"type": "boolean"
}
}
}
Fields§
§end_column: u64
§end_line_number: u64
§error_type: String
§message: String
§snippet: Option<String>
§start_column: u64
§start_line_number: u64
§warning: bool
Implementations§
Source§impl SqlCompilerMessage
impl SqlCompilerMessage
pub fn builder() -> SqlCompilerMessage
Trait Implementations§
Source§impl Clone for SqlCompilerMessage
impl Clone for SqlCompilerMessage
Source§fn clone(&self) -> SqlCompilerMessage
fn clone(&self) -> SqlCompilerMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SqlCompilerMessage
impl Debug for SqlCompilerMessage
Source§impl<'de> Deserialize<'de> for SqlCompilerMessage
impl<'de> Deserialize<'de> for SqlCompilerMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&SqlCompilerMessage> for SqlCompilerMessage
impl From<&SqlCompilerMessage> for SqlCompilerMessage
Source§fn from(value: &SqlCompilerMessage) -> Self
fn from(value: &SqlCompilerMessage) -> Self
Converts to this type from the input type.
Source§impl From<SqlCompilerMessage> for SqlCompilerMessage
impl From<SqlCompilerMessage> for SqlCompilerMessage
Source§fn from(value: SqlCompilerMessage) -> Self
fn from(value: SqlCompilerMessage) -> Self
Converts to this type from the input type.
Source§impl Serialize for SqlCompilerMessage
impl Serialize for SqlCompilerMessage
Source§impl TryFrom<SqlCompilerMessage> for SqlCompilerMessage
impl TryFrom<SqlCompilerMessage> for SqlCompilerMessage
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: SqlCompilerMessage) -> Result<Self, ConversionError>
fn try_from(value: SqlCompilerMessage) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SqlCompilerMessage
impl RefUnwindSafe for SqlCompilerMessage
impl Send for SqlCompilerMessage
impl Sync for SqlCompilerMessage
impl Unpin for SqlCompilerMessage
impl UnwindSafe for SqlCompilerMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more