pub enum SqlError {
Lex {
message: String,
span: Span,
line: usize,
column: usize,
},
Parse {
message: String,
span: Span,
line: usize,
column: usize,
},
Sqlx(String),
SqlxRestoration(String),
Validation(String),
Format(String),
}Expand description
Every error this crate returns.
Variants§
Lex
The text could not be tokenized (an unterminated string, comment or quoted name).
Parse
The tokens do not form valid GoogleSQL.
Sqlx(String)
A Dataform SQLX file or block is malformed.
SqlxRestoration(String)
A rewrite lost or duplicated a masked SQLX interpolation.
Validation(String)
Input refused by a validator (read-only query check, table path check, preferences).
Format(String)
The formatter or complexity scorer could not handle the input.
Implementations§
Source§impl SqlError
impl SqlError
Trait Implementations§
impl Eq for SqlError
Source§impl Error for SqlError
impl Error for SqlError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for SqlError
Auto Trait Implementations§
impl Forget for SqlError
impl Freeze for SqlError
impl Move for SqlError
impl RefUnwindSafe for SqlError
impl Send for SqlErrorwhere
RawVecInner: Send,
impl Sync for SqlErrorwhere
RawVecInner: Sync,
impl Unpin for SqlError
impl UnsafeUnpin for SqlError
impl UnwindSafe for SqlErrorwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.