Skip to main content

Node

Enum Node 

Source
pub enum Node<'a> {
Show 79 variants AggregateFunctionCall(AggregateFunctionCall<'a>), OrderedSetFunctionCall(OrderedSetFunctionCall<'a>), CastExpr(CastExpr<'a>), ColumnRef(ColumnRef<'a>), CompoundSelect(CompoundSelect<'a>), SubqueryExpr(SubqueryExpr<'a>), ExistsExpr(ExistsExpr<'a>), InExpr(InExpr<'a>), IsExpr(IsExpr<'a>), BetweenExpr(BetweenExpr<'a>), LikeExpr(LikeExpr<'a>), CaseExpr(CaseExpr<'a>), CaseWhen(CaseWhen<'a>), CaseWhenList(CaseWhenList<'a>), ForeignKeyClause(ForeignKeyClause<'a>), ColumnConstraint(ColumnConstraint<'a>), ColumnConstraintList(ColumnConstraintList<'a>), ColumnDef(ColumnDef<'a>), ColumnDefList(ColumnDefList<'a>), TableConstraint(TableConstraint<'a>), TableConstraintList(TableConstraintList<'a>), CreateTableStmt(CreateTableStmt<'a>), CteDefinition(CteDefinition<'a>), CteList(CteList<'a>), WithClause(WithClause<'a>), UpsertClause(UpsertClause<'a>), UpsertClauseList(UpsertClauseList<'a>), DeleteStmt(DeleteStmt<'a>), SetClause(SetClause<'a>), SetClauseList(SetClauseList<'a>), UpdateStmt(UpdateStmt<'a>), InsertStmt(InsertStmt<'a>), BinaryExpr(BinaryExpr<'a>), UnaryExpr(UnaryExpr<'a>), Literal(Literal<'a>), IdentName(IdentName<'a>), Error(Error<'a>), ExprList(ExprList<'a>), FunctionCall(FunctionCall<'a>), Variable(Variable<'a>), CollateExpr(CollateExpr<'a>), RaiseExpr(RaiseExpr<'a>), QualifiedName(QualifiedName<'a>), DropStmt(DropStmt<'a>), AlterTableStmt(AlterTableStmt<'a>), TransactionStmt(TransactionStmt<'a>), SavepointStmt(SavepointStmt<'a>), ResultColumn(ResultColumn<'a>), ResultColumnList(ResultColumnList<'a>), SelectStmt(SelectStmt<'a>), OrderingTerm(OrderingTerm<'a>), OrderByList(OrderByList<'a>), LimitClause(LimitClause<'a>), TableRef(TableRef<'a>), SubqueryTableSource(SubqueryTableSource<'a>), JoinClause(JoinClause<'a>), JoinPrefix(JoinPrefix<'a>), TriggerEvent(TriggerEvent<'a>), TriggerCmdList(TriggerCmdList<'a>), CreateTriggerStmt(CreateTriggerStmt<'a>), CreateVirtualTableStmt(CreateVirtualTableStmt<'a>), PragmaStmt(PragmaStmt<'a>), AnalyzeOrReindexStmt(AnalyzeOrReindexStmt<'a>), AttachStmt(AttachStmt<'a>), DetachStmt(DetachStmt<'a>), VacuumStmt(VacuumStmt<'a>), ExplainStmt(ExplainStmt<'a>), CreateIndexStmt(CreateIndexStmt<'a>), CreateViewStmt(CreateViewStmt<'a>), ValuesRowList(ValuesRowList<'a>), ValuesClause(ValuesClause<'a>), FrameBound(FrameBound<'a>), FrameSpec(FrameSpec<'a>), WindowDef(WindowDef<'a>), WindowDefList(WindowDefList<'a>), NamedWindowDef(NamedWindowDef<'a>), NamedWindowDefList(NamedWindowDefList<'a>), FilterOver(FilterOver<'a>), Other { id: AnyNodeId, tag: AnyNodeTag, },
}
Expand description

A typed AST node. Pattern-match to access the concrete type.

Variants§

§

AggregateFunctionCall(AggregateFunctionCall<'a>)

§

OrderedSetFunctionCall(OrderedSetFunctionCall<'a>)

§

CastExpr(CastExpr<'a>)

§

ColumnRef(ColumnRef<'a>)

§

CompoundSelect(CompoundSelect<'a>)

§

SubqueryExpr(SubqueryExpr<'a>)

§

ExistsExpr(ExistsExpr<'a>)

§

InExpr(InExpr<'a>)

§

IsExpr(IsExpr<'a>)

§

BetweenExpr(BetweenExpr<'a>)

§

LikeExpr(LikeExpr<'a>)

§

CaseExpr(CaseExpr<'a>)

§

CaseWhen(CaseWhen<'a>)

§

CaseWhenList(CaseWhenList<'a>)

List of CaseWhen.

§

ForeignKeyClause(ForeignKeyClause<'a>)

§

ColumnConstraint(ColumnConstraint<'a>)

§

ColumnConstraintList(ColumnConstraintList<'a>)

§

ColumnDef(ColumnDef<'a>)

§

ColumnDefList(ColumnDefList<'a>)

List of ColumnDef.

§

TableConstraint(TableConstraint<'a>)

§

TableConstraintList(TableConstraintList<'a>)

List of TableConstraint.

§

CreateTableStmt(CreateTableStmt<'a>)

§

CteDefinition(CteDefinition<'a>)

§

CteList(CteList<'a>)

List of CteDefinition.

§

WithClause(WithClause<'a>)

§

UpsertClause(UpsertClause<'a>)

§

UpsertClauseList(UpsertClauseList<'a>)

List of UpsertClause.

§

DeleteStmt(DeleteStmt<'a>)

§

SetClause(SetClause<'a>)

§

SetClauseList(SetClauseList<'a>)

List of SetClause.

§

UpdateStmt(UpdateStmt<'a>)

§

InsertStmt(InsertStmt<'a>)

§

BinaryExpr(BinaryExpr<'a>)

§

UnaryExpr(UnaryExpr<'a>)

§

Literal(Literal<'a>)

§

IdentName(IdentName<'a>)

§

Error(Error<'a>)

§

ExprList(ExprList<'a>)

List of Expr.

§

FunctionCall(FunctionCall<'a>)

§

Variable(Variable<'a>)

§

CollateExpr(CollateExpr<'a>)

§

RaiseExpr(RaiseExpr<'a>)

§

QualifiedName(QualifiedName<'a>)

§

DropStmt(DropStmt<'a>)

§

AlterTableStmt(AlterTableStmt<'a>)

§

TransactionStmt(TransactionStmt<'a>)

§

SavepointStmt(SavepointStmt<'a>)

§

ResultColumn(ResultColumn<'a>)

§

ResultColumnList(ResultColumnList<'a>)

List of ResultColumn.

§

SelectStmt(SelectStmt<'a>)

§

OrderingTerm(OrderingTerm<'a>)

§

OrderByList(OrderByList<'a>)

List of OrderingTerm.

§

LimitClause(LimitClause<'a>)

§

TableRef(TableRef<'a>)

§

SubqueryTableSource(SubqueryTableSource<'a>)

§

JoinClause(JoinClause<'a>)

§

JoinPrefix(JoinPrefix<'a>)

§

TriggerEvent(TriggerEvent<'a>)

§

TriggerCmdList(TriggerCmdList<'a>)

List of Stmt.

§

CreateTriggerStmt(CreateTriggerStmt<'a>)

§

CreateVirtualTableStmt(CreateVirtualTableStmt<'a>)

§

PragmaStmt(PragmaStmt<'a>)

§

AnalyzeOrReindexStmt(AnalyzeOrReindexStmt<'a>)

§

AttachStmt(AttachStmt<'a>)

§

DetachStmt(DetachStmt<'a>)

§

VacuumStmt(VacuumStmt<'a>)

§

ExplainStmt(ExplainStmt<'a>)

§

CreateIndexStmt(CreateIndexStmt<'a>)

§

CreateViewStmt(CreateViewStmt<'a>)

§

ValuesRowList(ValuesRowList<'a>)

List of ExprList.

§

ValuesClause(ValuesClause<'a>)

§

FrameBound(FrameBound<'a>)

§

FrameSpec(FrameSpec<'a>)

§

WindowDef(WindowDef<'a>)

§

WindowDefList(WindowDefList<'a>)

List of WindowDef.

§

NamedWindowDef(NamedWindowDef<'a>)

§

NamedWindowDefList(NamedWindowDefList<'a>)

List of NamedWindowDef.

§

FilterOver(FilterOver<'a>)

§

Other

A node with an unknown tag from a dialect extension.

Implementations§

Source§

impl<'a> Node<'a>

Source

pub fn tag(&self) -> NodeTag

The node’s tag.

Source

pub fn node_id(&self) -> NodeId

The typed node ID of this node.

Trait Implementations§

Source§

impl<'a> Clone for Node<'a>

Source§

fn clone(&self) -> Node<'a>

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<'a> Debug for Node<'a>

Source§

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

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

impl<'a> From<Node<'a>> for NodeId

Source§

fn from(n: Node<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> GrammarNodeType<'a> for Node<'a>

Source§

fn from_result( stmt_result: &'a AnyParsedStatement<'a>, id: AnyNodeId, ) -> Option<Self>

Resolve id to Self, or None if null, invalid, or tag mismatch.
Source§

impl<'a> Copy for Node<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Node<'a>

§

impl<'a> !RefUnwindSafe for Node<'a>

§

impl<'a> !Send for Node<'a>

§

impl<'a> !Sync for Node<'a>

§

impl<'a> Unpin for Node<'a>

§

impl<'a> UnsafeUnpin for Node<'a>

§

impl<'a> !UnwindSafe for Node<'a>

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