#[non_exhaustive]pub enum DiagnosticCode {
Show 22 variants
Syntax,
Unsupported,
UnknownTable,
UnknownColumn,
UnknownType,
Duplicate,
TypeMismatch,
UntypedBindMarker,
Annotation,
Arity,
PrimaryKey,
UnsupportedType,
IncompleteKey,
InvalidRestriction,
BroadScan,
AllowFiltering,
NonKeyRestriction,
ClusteringGap,
UnknownFunction,
MissingAlias,
OrderBy,
ReservedWord,
}Expand description
Stable diagnostic codes. CQL0xx are syntax problems, CQL1xx are
errors from schema resolution / type checking, CQL2xx are warnings.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Syntax
Syntax error.
Unsupported
Valid CQL that cqlc does not support (yet).
UnknownTable
Unknown table.
UnknownColumn
Unknown column.
UnknownType
Unknown type.
Duplicate
Duplicate definition.
TypeMismatch
Literal or value does not fit the column type.
UntypedBindMarker
Bind marker in a position whose type cannot be inferred.
Annotation
Missing or invalid -- name: annotation.
Arity
Wrong number of values / too many bind markers.
PrimaryKey
Invalid primary key definition.
UnsupportedType
Type has no supported Rust mapping.
IncompleteKey
Statement misses required primary key restrictions.
InvalidRestriction
Restriction or assignment that Cassandra rejects.
BroadScan
Query may scan more than one partition.
AllowFiltering
ALLOW FILTERING in use.
NonKeyRestriction
Restriction on a non-key column.
ClusteringGap
Clustering restriction skips a column.
UnknownFunction
Unknown function.
MissingAlias
Expression in the selection list needs an AS alias.
OrderBy
ORDER BY may not match the clustering order.
ReservedWord
Reserved CQL keyword used as an unquoted identifier.
Implementations§
Source§impl DiagnosticCode
impl DiagnosticCode
Sourcepub const WARNINGS: [DiagnosticCode; 5]
pub const WARNINGS: [DiagnosticCode; 5]
Every warning code, i.e. the ones -- allow: may silence.
Sourcepub fn parse_warning(s: &str) -> Option<DiagnosticCode>
pub fn parse_warning(s: &str) -> Option<DiagnosticCode>
Parses a code such as CQL201 (case-insensitive) if it is a warning.