Skip to main content

ParseError

Enum ParseError 

Source
pub enum ParseError {
Show 48 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), UnknownCheckOptionVariant(i32), UnknownCheckOptionValue(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), DuplicateStatistic(QualifiedName, SourceLocation), StatisticAnonymous(SourceLocation), StatisticEmptyKinds(QualifiedName, SourceLocation), StatisticEmptyColumns(QualifiedName, SourceLocation), UnknownStatisticKind(String, QualifiedName, SourceLocation), StatisticIncludeNotSupported(QualifiedName, SourceLocation), StatisticRenameNotSupported(QualifiedName, SourceLocation), AlterStatisticBeforeCreate(QualifiedName, SourceLocation), CommentOnStatisticBeforeCreate(QualifiedName, SourceLocation),
}
Expand description

Errors raised by the source parser.

Variants§

§

Io

I/O error while reading a source file.

Fields

§path: PathBuf

Path that failed.

§source: Error

Underlying I/O error.

§

PgQuery

pg_query rejected the SQL.

Fields

§location: SourceLocation

Source location.

§message: String

Message from pg_query.

§

UnsupportedObjectKind

CREATE was for an object kind not supported in v0.1.

Fields

§location: SourceLocation

Source location.

§kind: &'static str

Object kind name (e.g., “CREATE VIEW”).

§

UnqualifiedName

CREATE was missing required schema qualification and no -- @pgevolve schema=... directive applied.

Fields

§location: SourceLocation

Source location.

§

Structural

Generic structural error during AST → IR conversion.

Fields

§location: SourceLocation

Source location.

§message: String

Diagnostic message.

§

Ir

IR construction failed (e.g., invalid identifier in source).

Fields

§location: SourceLocation

Source location.

§source: IrError

Underlying error.

§

InvalidDirective

A directive was malformed.

Fields

§location: SourceLocation

Source location.

§message: String

Diagnostic.

§

DuplicateObject

Two definitions of the same object qname were found.

Fields

§qname: String

Object qname (rendered).

§first: SourceLocation

First definition location.

§second: SourceLocation

Second 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.

§

UnknownCheckOptionVariant(i32)

ViewStmt.with_check_option held an unrecognized integer.

§

UnknownCheckOptionValue(String)

A check_option WITH-option had an unrecognized string value.

§

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.

§

DuplicateStatistic(QualifiedName, SourceLocation)

A statistic with this qname was declared more than once.

§

StatisticAnonymous(SourceLocation)

CREATE STATISTICS had no name (anonymous form is not supported).

§

StatisticEmptyKinds(QualifiedName, SourceLocation)

CREATE STATISTICS had an empty kinds clause (at least one of ndistinct, dependencies, mcv is required).

§

StatisticEmptyColumns(QualifiedName, SourceLocation)

CREATE STATISTICS had no columns in the ON clause.

§

UnknownStatisticKind(String, QualifiedName, SourceLocation)

An unrecognized kind appeared in a CREATE STATISTICS (…) clause.

§

StatisticIncludeNotSupported(QualifiedName, SourceLocation)

CREATE STATISTICS … INCLUDE (…) is not supported (PG 18+, deferred to v0.4.x).

§

StatisticRenameNotSupported(QualifiedName, SourceLocation)

ALTER STATISTICS … RENAME TO … is not supported.

§

AlterStatisticBeforeCreate(QualifiedName, SourceLocation)

ALTER STATISTICS s … appeared before the matching CREATE STATISTICS s.

§

CommentOnStatisticBeforeCreate(QualifiedName, SourceLocation)

COMMENT ON STATISTICS s … appeared before the matching CREATE STATISTICS s.

Trait Implementations§

Source§

impl Debug for ParseError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ParseError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ParseError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ParseError> for Error

Source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.