pub enum ErrorKind {
Show 13 variants
ParseTemplate,
UnknownFunction(String),
IntegerOverflow(String),
NotEnoughArguments(Function),
InvalidRegex(String),
UnknownRegexFlag(char),
UnsupportedRegexElement(String),
InvalidArgumentType {
name: Function,
index: usize,
expected: &'static str,
},
InvalidArguments {
name: Function,
cause: String,
},
InvalidTimestampString(String),
WriteSqlSchema,
WriteSqlData,
WriteSqlValue,
// some variants omitted
}
Expand description
Kinds of errors produced by the dbgen
library.
Variants
ParseTemplate
Failed to parse template.
UnknownFunction(String)
Tuple Fields
0: String
The name of the unknown SQL function.
Unknown SQL function.
IntegerOverflow(String)
Tuple Fields
0: String
The string representation of the expression that produced the overflow.
Integer is too big.
NotEnoughArguments(Function)
Tuple Fields
0: Function
The SQL function causing the error.
Not enough arguments provided to the SQL function.
InvalidRegex(String)
Tuple Fields
0: String
The regex pattern.
Invalid regex.
UnknownRegexFlag(char)
Tuple Fields
0: char
The regex flag.
Unknown regex flag.
UnsupportedRegexElement(String)
Tuple Fields
0: String
The regex element.
Unsupported regex element (e.g. \b
)
InvalidArgumentType
Fields
name: Function
The SQL function causing the error.
index: usize
Argument index.
expected: &'static str
The expected type.
Invalid argument type.
If this error is encountered during compilation phase, the error will be ignored and the function will be kept in raw form.
InvalidArguments
Invalid arguments.
InvalidTimestampString(String)
Tuple Fields
0: String
The literal which is in the wrong format.
The timestamp string is invalid
WriteSqlSchema
Failed to write the SQL CREATE TABLE
schema file.
WriteSqlData
Failed to write the SQL data file.
WriteSqlValue
Failed to write an SQL value.
Trait Implementations
sourceimpl Fail for ErrorKind
impl Fail for ErrorKind
sourcefn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Backtrace
carried by this failure, if it
carries one. Read more