Table of Contents

Class TJoin

Namespace
gudusoft.gsqlparser.nodes
Assembly
gudusoft.gsqlparser.dll

A list of join joins represents table sources in following clauses of SQL statement:

  • from clause of select statement.
  • from clause of delete statement, Specifies an additional FROM clause, This Transact-SQL extension to DELETE allows specifying data from table_source and deleting the corresponding rows from the table in the first FROM clause.
  • from clause of update statement, Specifies that a table, view, or derived table source is used to provide the criteria for the update operation.

Each table source in from clause was treated as a join which is type of TJoin.

The reason for this design is that we can treat all table sources in from clause in a uniform way.

public class TJoin : TNodeWithAliasClause, Visitable
Inheritance
TJoin
Implements
Inherited Members

Constructors

TJoin()

public TJoin()

Properties

AliasClause

alias of Join, valid only when join_source_join. In this SQL, alias is "as a_join"

select a_join.f1
   from (a as a_alias left join a1 on a1.f1 = a_alias.f1) as a_join
   join b on a_join.f1 = b.f1;

But in this SQL, alias is null, "as t1" is the alias of t1.

select f from t as t1 join t2 on t1.f1 = t2.f1
public override TAliasClause AliasClause { get; }

Property Value

TAliasClause

Join

public virtual TJoin Join { get; set; }

Property Value

TJoin

JoinItems

public virtual TJoinItemList JoinItems { get; set; }

Property Value

TJoinItemList

Kind

public virtual int Kind { get; set; }

Property Value

int

NestedParen

public virtual int NestedParen { get; set; }

Property Value

int

Table

public virtual TTable Table { get; set; }

Property Value

TTable

WithParen

public virtual bool WithParen { get; set; }

Property Value

bool

Methods

accept(TParseTreeVisitor)

public override void accept(TParseTreeVisitor v)

Parameters

v TParseTreeVisitor

acceptChildren(TParseTreeVisitor)

public override void acceptChildren(TParseTreeVisitor v)

Parameters

v TParseTreeVisitor