Struct sql::ast::transform::QueryIdentAgg[][src]

struct QueryIdentAgg<'a> {
    name: &'a Ident,
    qualifiers: HashMap<Ident, HashSet<Ident>>,
    min_qual_depth: usize,
    fail_on: Option<Ident>,
    err: Option<String>,
}
Expand description

Visits a Query, assessing catalog item Idents’ use of a specified Ident.

Fields

name: &'a Ident

The name whose usage you want to assess.

qualifiers: HashMap<Ident, HashSet<Ident>>

Tracks all second-level qualifiers used on name in a HashMap, as well as any third-level qualifiers used on those second-level qualifiers in a HashSet.

min_qual_depth: usize

Tracks the least qualified instance of name seen.

fail_on: Option<Ident>

Provides an option to fail the visit if encounters a specified Ident.

err: Option<String>

Implementations

Determines the depth of qualification needed to unambiguously reference catalog items in a Query.

Includes an option to fail if a given Ident is encountered.

Results of Ok(usize) indicate that name can be unambiguously referred to with usize parts, e.g. 2 requires schema and item name qualification.

Results of Err indicate that we cannot unambiguously reference name or encountered fail_on, if it’s provided.

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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