pub enum ParseError {
Show 37 variants
Io {
path: PathBuf,
source: Error,
},
PgQuery {
location: SourceLocation,
message: String,
},
UnsupportedObjectKind {
location: SourceLocation,
kind: &'static str,
},
UnqualifiedName {
location: SourceLocation,
},
Structural {
location: SourceLocation,
message: String,
},
Ir {
location: SourceLocation,
source: IrError,
},
InvalidDirective {
location: SourceLocation,
message: String,
},
DuplicateObject {
qname: String,
first: SourceLocation,
second: SourceLocation,
},
AstResolution(Vec<AstResolutionError>),
AstCanon(AstCanonError),
InvalidIdentifier(String, String),
DuplicatePublication(Identifier, SourceLocation),
PublicationAllTablesWithObjects(Identifier, SourceLocation),
PublicationObjectMalformed(Identifier, SourceLocation),
PublicationCurrentSchemaForm(Identifier, SourceLocation),
UnknownPublicationObjectType(i32, Identifier, SourceLocation),
UnqualifiedPublicationTable(Identifier, SourceLocation),
PublicationFilterParse(Identifier, QualifiedName, String, SourceLocation),
PublicationOptionMalformed(Identifier, SourceLocation),
UnknownPublicationOption(String, Identifier, SourceLocation),
UnknownPublishKind(String, Identifier, SourceLocation),
EmptyPublishBitset(Identifier, SourceLocation),
EmptyPublicationScope(Identifier, SourceLocation),
PublicationRenameNotSupported(Identifier, SourceLocation),
AlterPublicationBeforeCreate(Identifier, SourceLocation),
DuplicateSubscription(Identifier, SourceLocation),
SubscriptionEmptyConnection(Identifier, SourceLocation),
SubscriptionEmptyPublications(Identifier, SourceLocation),
SubscriptionOptionMalformed(Identifier, SourceLocation),
UnknownSubscriptionOption(String, Identifier, SourceLocation),
UnknownStreamingMode(String, Identifier, SourceLocation),
UnknownOriginMode(String, Identifier, SourceLocation),
SubscriptionRefreshNotSupported(Identifier, SourceLocation),
SubscriptionSkipNotSupported(Identifier, SourceLocation),
SubscriptionStandaloneEnableDisableNotSupported(Identifier, SourceLocation),
SubscriptionRenameNotSupported(Identifier, SourceLocation),
AlterSubscriptionBeforeCreate(Identifier, SourceLocation),
}Expand description
Errors raised by the source parser.
Variants§
Io
I/O error while reading a source file.
PgQuery
pg_query rejected the SQL.
UnsupportedObjectKind
CREATE was for an object kind not supported in v0.1.
Fields
location: SourceLocationSource location.
UnqualifiedName
CREATE was missing required schema qualification and no -- @pgevolve schema=...
directive applied.
Fields
location: SourceLocationSource location.
Structural
Generic structural error during AST → IR conversion.
Ir
IR construction failed (e.g., invalid identifier in source).
InvalidDirective
A directive was malformed.
DuplicateObject
Two definitions of the same object qname were found.
Fields
first: SourceLocationFirst definition location.
second: SourceLocationSecond definition location.
AstResolution(Vec<AstResolutionError>)
One or more structural references could not be resolved in source IR.
AstCanon(AstCanonError)
AST canonicalization pass failed (view body normalization or reference resolution error).
InvalidIdentifier(String, String)
A string could not be parsed as a valid identifier.
DuplicatePublication(Identifier, SourceLocation)
A publication with this name was declared more than once.
PublicationAllTablesWithObjects(Identifier, SourceLocation)
FOR ALL TABLES was combined with explicit object specs.
PublicationObjectMalformed(Identifier, SourceLocation)
A publication object spec node had an unexpected shape.
PublicationCurrentSchemaForm(Identifier, SourceLocation)
FOR TABLES IN CURRENT SCHEMA is not declarative — pgevolve rejects it.
UnknownPublicationObjectType(i32, Identifier, SourceLocation)
An unrecognized PublicationObjSpecType integer was encountered.
UnqualifiedPublicationTable(Identifier, SourceLocation)
A table in a publication was not schema-qualified.
PublicationFilterParse(Identifier, QualifiedName, String, SourceLocation)
Failed to parse the row filter expression for a published table.
PublicationOptionMalformed(Identifier, SourceLocation)
A WITH (...) option node for a publication had an unexpected shape.
UnknownPublicationOption(String, Identifier, SourceLocation)
An unrecognized key appeared in a publication WITH (...) clause.
UnknownPublishKind(String, Identifier, SourceLocation)
An unrecognized value appeared in a publish = '...' clause.
EmptyPublishBitset(Identifier, SourceLocation)
A publish = '...' clause was empty (no DML kinds enabled).
EmptyPublicationScope(Identifier, SourceLocation)
A CREATE PUBLICATION p had no scope clause (empty selective).
PublicationRenameNotSupported(Identifier, SourceLocation)
ALTER PUBLICATION p RENAME TO q is not supported.
AlterPublicationBeforeCreate(Identifier, SourceLocation)
ALTER PUBLICATION p ... appeared before the matching CREATE PUBLICATION p.
DuplicateSubscription(Identifier, SourceLocation)
A subscription with this name was declared more than once.
SubscriptionEmptyConnection(Identifier, SourceLocation)
CREATE SUBSCRIPTION had an empty CONNECTION string.
SubscriptionEmptyPublications(Identifier, SourceLocation)
CREATE SUBSCRIPTION had an empty PUBLICATION list.
SubscriptionOptionMalformed(Identifier, SourceLocation)
A WITH (...) option node for a subscription had an unexpected shape.
UnknownSubscriptionOption(String, Identifier, SourceLocation)
An unrecognized key appeared in a subscription WITH (...) clause.
UnknownStreamingMode(String, Identifier, SourceLocation)
An unrecognized value appeared in a streaming = ... clause.
UnknownOriginMode(String, Identifier, SourceLocation)
An unrecognized value appeared in an origin = ... clause.
SubscriptionRefreshNotSupported(Identifier, SourceLocation)
ALTER SUBSCRIPTION … REFRESH PUBLICATION is not supported.
SubscriptionSkipNotSupported(Identifier, SourceLocation)
ALTER SUBSCRIPTION … SKIP (…) is not supported.
SubscriptionStandaloneEnableDisableNotSupported(Identifier, SourceLocation)
ALTER SUBSCRIPTION … ENABLE/DISABLE (standalone, without SET) is not
supported. Declare WITH (enabled = true/false) in source instead.
SubscriptionRenameNotSupported(Identifier, SourceLocation)
ALTER SUBSCRIPTION … RENAME TO … is not supported.
AlterSubscriptionBeforeCreate(Identifier, SourceLocation)
ALTER SUBSCRIPTION p … appeared before the matching CREATE SUBSCRIPTION p.
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for ParseError
impl !RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl !UnwindSafe for ParseError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more