Enum sql_migration_sim::Error
source · pub enum Error {
AlteredMissingTable(String),
AlteredMissingColumn(String, String),
TableAlreadyExists(String),
FunctionAlreadyExists(String),
ColumnAlreadyExists(String, String),
RenameMissingIndex(String),
Parse(ParserError),
File {
source: Error,
filename: String,
},
}
Expand description
Errors that can occur while parsing SQL and updating the schema
Variants§
AlteredMissingTable(String)
Encountered an ALTER TABLE statement on a nonexistent table.
AlteredMissingColumn(String, String)
Encountered an ALTER COLUMN statement on a nonexistent column.
TableAlreadyExists(String)
Attempted to create a table that already exists
FunctionAlreadyExists(String)
Attempted to create a function that already exists
ColumnAlreadyExists(String, String)
Attempted to create a column that already exists
RenameMissingIndex(String)
Attempted to rename an index that doesn’t exist
Parse(ParserError)
The SQL parser encountered an error
File
Error reading a file
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl From<ParserError> for Error
impl From<ParserError> for Error
source§fn from(source: ParserError) -> Self
fn from(source: ParserError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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