Skip to main content

AnalysisProblem

Enum AnalysisProblem 

Source
pub enum AnalysisProblem {
Show 18 variants NameResolution(NameResolution), OverloadResolution(OverloadResolution), ExtensionNotFound(String), NullabilityUnknown(String), ArgumentTypeMissmatch(FullName, usize), DuplicateDefElemKey(DefElemKey), ExplicitCastNotDefined(TypeReference, TypeReference), CoalesceExprTypeUnknown(Vec<SemScalarExpr>), ExpressionTypeNotKnown(SemScalarExpr), UndefinedOperator(AExprKind, OperatorName, Option<SemScalarExpr>, Option<SemScalarExpr>), RequireArray(SemScalarExpr, TypeReference), SubQueryNotHaveColumnForDerivedColumnName(), IncompatibleCaseValues(HashSet<TypeReference>), CaseWhenExprTypeUnknown(SemScalarExpr), ArrayIndexTypeMissmatch(SemScalarExpr, TypeReference), MemberAccessRequiresCompositeType(FullName, String), FunctionArgImplicitCastNotFound(FullName, usize, TypeDefinition, SemScalarExpr), ImplicitCastNotFound(TypeReference, TypeReference),
}
Expand description

Semantic analysis problems

Variants§

§

NameResolution(NameResolution)

Name resolution problems

§

OverloadResolution(OverloadResolution)

Overload resolution problems

§

ExtensionNotFound(String)

extension not found

§

NullabilityUnknown(String)

can not to guess nullablity

§

ArgumentTypeMissmatch(FullName, usize)

Argument type missmatch

§

DuplicateDefElemKey(DefElemKey)

duplicate def elem key

§

ExplicitCastNotDefined(TypeReference, TypeReference)

explicit cast not defined

§

CoalesceExprTypeUnknown(Vec<SemScalarExpr>)

Coalesce expr type unknown

§

ExpressionTypeNotKnown(SemScalarExpr)

Expression type not known

§

UndefinedOperator(AExprKind, OperatorName, Option<SemScalarExpr>, Option<SemScalarExpr>)

Operator Not Defined

§

RequireArray(SemScalarExpr, TypeReference)

Array Required

§

SubQueryNotHaveColumnForDerivedColumnName()

sub query not have a derived column

§

IncompatibleCaseValues(HashSet<TypeReference>)

incompatible case values

§

CaseWhenExprTypeUnknown(SemScalarExpr)

case when expr type unknown

§

ArrayIndexTypeMissmatch(SemScalarExpr, TypeReference)

array type missmatch

§

MemberAccessRequiresCompositeType(FullName, String)

member access requires composite type

§

FunctionArgImplicitCastNotFound(FullName, usize, TypeDefinition, SemScalarExpr)

function argument implicit cast not found

§

ImplicitCastNotFound(TypeReference, TypeReference)

implicit cast not found

Implementations§

Source§

impl AnalysisProblem

Source

pub fn column_not_found_in_view( view_name: &ViewName, column: &ColumnName, ) -> Self

column not found in view

Source

pub fn column_not_found_in_subquery( alias: &AliasName, column: &ColumnName, ) -> Self

specfied column not found in sub query

Source

pub fn column_not_found_in_table( table_name: &TableName, col_name: &ColumnName, ) -> Self

specified column not found in table

Source

pub fn column_not_found_in_cte(cte_name: &CteName, column: &ColumnName) -> Self

specified column not found in CTE

Source

pub fn column_not_found_in_source(column: &ColumnName) -> Self

column not found

Source

pub fn column_not_found_in_table_function( alias: &AliasName, column: &ColumnName, ) -> Self

column not found in table function

Source§

impl AnalysisProblem

Source

pub fn duplicate_alias(alias_name: &AliasName) -> Self

alias name duplicate in FROM clause

Source

pub fn composite_type_field_not_found( composite_type: &TypeReference, field_name: &str, ) -> Self

accessing member not found in complex type

Source

pub fn ambiguous_column(column: &ColumnName) -> Self

same column name existing from clause

Source

pub fn table_not_found(table_name: &TableName) -> Self

alter table not found

Source

pub fn sequence_not_found(seq_name: &FullName) -> Self

sequence not found

Source

pub fn index_not_found(index_name: &str) -> Self

specified index not found

Source

pub fn view_not_found(view_name: &ViewName) -> Self

specified view not found

Source

pub fn domain_type_name_not_found( domain_name: &FullName, type_name: &TypeName, type_name_span: &StringSpan, ) -> Self

domain not found

Source

pub fn relation_not_found(table_name: &TableName) -> Self

specified table not found

Source

pub fn function_not_found(func_name: &FullName, func_span: &StringSpan) -> Self

calling function not found

Source

pub fn table_function_not_found(func: &FullName) -> Self

specified table function not found

Source

pub fn column_type_not_found( table_name: &TableName, colname: &ColumnName, type_name: &FullName, ) -> Self

table column type

Source

pub fn undefined_alias(alias_name: String) -> Self

undefined alias

Source§

impl AnalysisProblem

Source

pub fn function_overload_resolution_failed( func_name: &FullName, arg_types: &ArgumentBindingCollection, ) -> Self

function argument type missmatch to overloads

Source

pub fn binary_operator_overload_resolution_failed( operator_def: &OperatorDefinition, left_type: &TypeReference, right_type: &TypeReference, ) -> Self

Binary operator type not matches overloads

Source

pub fn unary_operator_overload_resolution_failed( operator_def: &OperatorDefinition, arg_type: &TypeReference, ) -> Self

Unarry operator type not matches overloads

Source

pub fn binary_operator_overload_ambiguous( operator_def: &OperatorDefinition, left_type: &TypeReference, right_type: &TypeReference, ) -> Self

Binary operaot type overloads ambiguous

Source

pub fn unary_operator_overload_ambiguous( operator_def: &OperatorDefinition, arg_type: &TypeReference, ) -> Self

Unarray operator type ambiguous

Source§

impl AnalysisProblem

Source

pub fn render_report( &self, theme: &HighlighterTheme, source: String, ) -> Result<String, AnalysisError>

covert problem to report

Source

pub fn extension_not_found(name: &str) -> Self

extension not found

Source

pub fn nullability_unknown(item_name: &str) -> Self

expression nullability not known

Source

pub fn argument_type_missmatch(func_name: &FullName, index: usize) -> Self

function argument type missmatch

Source

pub fn duplicate_def_elem_key(key: &DefElemKey) -> Self

duplicate name in definition element

Source

pub fn explicit_cast_not_defined( source: &TypeReference, target: &TypeReference, ) -> Self

doing explicit cast coversion , but not allowed

Source

pub fn array_required( expr: &SemScalarExpr, type_inspected: &TypeReference, ) -> Self

expression requires array but not

Source

pub fn array_index_type_missmatch( expr: &SemScalarExpr, type_inspected: &TypeReference, ) -> Self

array index type not integer

Source

pub fn member_access_requires_composite_type( type_name: &FullName, member_name: &str, ) -> Self

member accessing to non-composite type

Source

pub fn undefined_operator( aexpr_op: AExprKind, name: &OperatorName, left_arg: &Option<SemScalarExpr>, right_arg: &Option<SemScalarExpr>, ) -> Self

operator not defined

Source

pub fn parameter_type_missmatch_for_table_function( call: &FuncCall, arg_types: ArgumentBindingCollection, ) -> Self

parameter type can not cast to function argument

Source

pub fn function_result_set_type_not_found(ret_type: &FullName) -> Self

specified function result set type not found

Source

pub fn unreachable_coalesce_argument( arg_expr: &SemScalarExpr, first_non_null: &SemScalarExpr, ) -> Self

coalece argument unreachable

Source

pub fn unknown_type_in_coalesce_expr(arg_expr: &SemScalarExpr) -> Self

unknown type used in coalesce

Source

pub fn coalesce_expr_type_ambiguous( arg_exprs: &Vec<SemScalarExpr>, candiates: &HashSet<TypeReference>, choose: Option<&TypeReference>, ) -> Self

colesce expression result type ambiguous

Source

pub fn coalesce_expr_type_unknown(arg_exprs: &[SemScalarExpr]) -> Self

all of coalesce type is not known

Source

pub fn function_arg_implicit_cast_not_found( func_name: &FullName, index: usize, t: &TypeDefinition, arg: &SemScalarExpr, ) -> Self

implicit cast not allowed

Source

pub fn view_not_matview(view_name: &ViewName) -> Self

view used as materialized view, but not a materialized view

Source

pub fn operator_name_syntax(v: &[String]) -> Self

operator name syntax is invalid

Source

pub fn expression_type_not_known(expr: &SemScalarExpr) -> Self

expression type not known

Source

pub fn case_when_type_unknown(case_when_expr: SemScalarExpr) -> Self

case when type unknown

Source

pub fn implicit_cast_not_found( ty: &TypeReference, result_type: &TypeReference, ) -> Self

implicit cast not found

Source

pub fn incompatible_case_values(result_types: HashSet<TypeReference>) -> Self

incompatible cast values

Source

pub fn unexpected_dynamic_type(sem_type: &TypeDefinition) -> Self

unexpected dynamic type

Source

pub fn table_not_have_column_for_derived_column_name() -> Self

table not have column

Source

pub fn cte_not_have_column_for_derived_column_name() -> Self

cte not have column

Source

pub fn subquery_not_have_column_for_derived_column_name() -> Self

subquery not have column

Trait Implementations§

Source§

impl Clone for AnalysisProblem

Source§

fn clone(&self) -> AnalysisProblem

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AnalysisProblem

Source§

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

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more