DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | List of all members
Deveel.Data.Sql.Query.TablePlan Class Reference

Public Member Functions

 TablePlan (IQueryPlanNode plan, ObjectName[] columnNames, string[] uniqueNames)
 
void SetCachePoint ()
 
void SetUpdated ()
 
void LeftJoin (TablePlan left, JoinType joinType, SqlExpression onExpression)
 
void RightJoin (TablePlan right, JoinType joinType, SqlExpression onExpression)
 
void MergeJoin (TablePlan left, TablePlan right)
 
bool ContainsColumn (ObjectName columnName)
 
bool ContainsName (string name)
 
TablePlan Clone ()
 
void UpdatePlan (IQueryPlanNode queryPlan)
 

Properties

IQueryPlanNode Plan [get, private set]
 Returns the plan for this table source. More...
 
bool IsUpdated [get, private set]
 Returns true if the planner was updated. More...
 
ObjectName[] ColumnNames [get, private set]
 The list of fully qualified column objects that are accessible within this plan. More...
 
string[] UniqueNames [get, private set]
 The list of unique key names of the tables in this plan. More...
 
TablePlan LeftPlan [get, private set]
 
TablePlan RightPlan [get, private set]
 
JoinType LeftJoinType [get, private set]
 
JoinType RightJoinType [get, private set]
 
SqlExpression LeftOnExpression [get, private set]
 
SqlExpression RightOnExpression [get, private set]
 

Detailed Description

Definition at line 23 of file TablePlan.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Query.TablePlan.TablePlan ( IQueryPlanNode  plan,
ObjectName[]  columnNames,
string[]  uniqueNames 
)
inline

Definition at line 24 of file TablePlan.cs.

24  {
25  if (plan == null)
26  throw new ArgumentNullException("plan");
27  if (columnNames == null)
28  throw new ArgumentNullException("columnNames");
29 
30  Plan = plan;
31  ColumnNames = columnNames;
32  UniqueNames = uniqueNames;
33  LeftJoinType = JoinType.None;
34  RightJoinType = JoinType.None;
35  IsUpdated = false;
36  }
string[] UniqueNames
The list of unique key names of the tables in this plan.
Definition: TablePlan.cs:57
JoinType
Enumerates the kind of group join in a selection query.
Definition: JoinType.cs:23
ObjectName[] ColumnNames
The list of fully qualified column objects that are accessible within this plan.
Definition: TablePlan.cs:52
bool IsUpdated
Returns true if the planner was updated.
Definition: TablePlan.cs:46
IQueryPlanNode Plan
Returns the plan for this table source.
Definition: TablePlan.cs:41

Member Function Documentation

TablePlan Deveel.Data.Sql.Query.TablePlan.Clone ( )
inline

Definition at line 127 of file TablePlan.cs.

127  {
128  return new TablePlan(Plan, ColumnNames, UniqueNames);
129  }
string[] UniqueNames
The list of unique key names of the tables in this plan.
Definition: TablePlan.cs:57
ObjectName[] ColumnNames
The list of fully qualified column objects that are accessible within this plan.
Definition: TablePlan.cs:52
TablePlan(IQueryPlanNode plan, ObjectName[] columnNames, string[] uniqueNames)
Definition: TablePlan.cs:24
IQueryPlanNode Plan
Returns the plan for this table source.
Definition: TablePlan.cs:41
bool Deveel.Data.Sql.Query.TablePlan.ContainsColumn ( ObjectName  columnName)
inline

Definition at line 116 of file TablePlan.cs.

116  {
117  return ColumnNames.Contains(columnName);
118  }
ObjectName[] ColumnNames
The list of fully qualified column objects that are accessible within this plan.
Definition: TablePlan.cs:52
bool Deveel.Data.Sql.Query.TablePlan.ContainsName ( string  name)
inline

Definition at line 120 of file TablePlan.cs.

120  {
121  if (UniqueNames == null || UniqueNames.Length == 0)
122  return false;
123 
124  return UniqueNames.Contains(name);
125  }
string[] UniqueNames
The list of unique key names of the tables in this plan.
Definition: TablePlan.cs:57
void Deveel.Data.Sql.Query.TablePlan.LeftJoin ( TablePlan  left,
JoinType  joinType,
SqlExpression  onExpression 
)
inline

Definition at line 80 of file TablePlan.cs.

80  {
81  LeftPlan = left;
82  LeftJoinType = joinType;
83  LeftOnExpression = onExpression;
84  }
SqlExpression LeftOnExpression
Definition: TablePlan.cs:67
void Deveel.Data.Sql.Query.TablePlan.MergeJoin ( TablePlan  left,
TablePlan  right 
)
inline

Definition at line 92 of file TablePlan.cs.

92  {
93  if (left.RightPlan != right) {
94  if (left.RightPlan != null) {
95  RightJoin(left.RightPlan, left.RightJoinType, left.RightOnExpression);
96  RightPlan.LeftPlan = this;
97  }
98  if (right.LeftPlan != null) {
99  LeftJoin(right.LeftPlan, right.LeftJoinType, right.LeftOnExpression);
100  LeftPlan.RightPlan = this;
101  }
102  }
103 
104  if (left.LeftPlan != right) {
105  if (LeftPlan == null && left.LeftPlan != null) {
106  LeftJoin(left.LeftPlan, left.LeftJoinType, left.LeftOnExpression);
107  LeftPlan.RightPlan = this;
108  }
109  if (RightPlan == null && right.RightPlan != null) {
110  RightJoin(right.RightPlan, right.RightJoinType, right.RightOnExpression);
111  RightPlan.LeftPlan = this;
112  }
113  }
114  }
void RightJoin(TablePlan right, JoinType joinType, SqlExpression onExpression)
Definition: TablePlan.cs:86
void LeftJoin(TablePlan left, JoinType joinType, SqlExpression onExpression)
Definition: TablePlan.cs:80
void Deveel.Data.Sql.Query.TablePlan.RightJoin ( TablePlan  right,
JoinType  joinType,
SqlExpression  onExpression 
)
inline

Definition at line 86 of file TablePlan.cs.

86  {
87  RightPlan = right;
88  RightJoinType = joinType;
89  RightOnExpression = onExpression;
90  }
SqlExpression RightOnExpression
Definition: TablePlan.cs:69
void Deveel.Data.Sql.Query.TablePlan.SetCachePoint ( )
inline

Definition at line 71 of file TablePlan.cs.

71  {
72  if (!(Plan is CachePointNode))
73  Plan = new CachePointNode(Plan);
74  }
IQueryPlanNode Plan
Returns the plan for this table source.
Definition: TablePlan.cs:41
void Deveel.Data.Sql.Query.TablePlan.SetUpdated ( )
inline

Definition at line 76 of file TablePlan.cs.

76  {
77  IsUpdated = true;
78  }
bool IsUpdated
Returns true if the planner was updated.
Definition: TablePlan.cs:46
void Deveel.Data.Sql.Query.TablePlan.UpdatePlan ( IQueryPlanNode  queryPlan)
inline

Definition at line 131 of file TablePlan.cs.

131  {
132  Plan = queryPlan;
133  IsUpdated = true;
134  }
bool IsUpdated
Returns true if the planner was updated.
Definition: TablePlan.cs:46
IQueryPlanNode Plan
Returns the plan for this table source.
Definition: TablePlan.cs:41

Property Documentation

ObjectName [] Deveel.Data.Sql.Query.TablePlan.ColumnNames
getprivate set

The list of fully qualified column objects that are accessible within this plan.

Definition at line 52 of file TablePlan.cs.

bool Deveel.Data.Sql.Query.TablePlan.IsUpdated
getprivate set

Returns true if the planner was updated.

Definition at line 46 of file TablePlan.cs.

JoinType Deveel.Data.Sql.Query.TablePlan.LeftJoinType
getprivate set

Definition at line 63 of file TablePlan.cs.

SqlExpression Deveel.Data.Sql.Query.TablePlan.LeftOnExpression
getprivate set

Definition at line 67 of file TablePlan.cs.

TablePlan Deveel.Data.Sql.Query.TablePlan.LeftPlan
getprivate set

Definition at line 59 of file TablePlan.cs.

IQueryPlanNode Deveel.Data.Sql.Query.TablePlan.Plan
getprivate set

Returns the plan for this table source.

Definition at line 41 of file TablePlan.cs.

JoinType Deveel.Data.Sql.Query.TablePlan.RightJoinType
getprivate set

Definition at line 65 of file TablePlan.cs.

SqlExpression Deveel.Data.Sql.Query.TablePlan.RightOnExpression
getprivate set

Definition at line 69 of file TablePlan.cs.

TablePlan Deveel.Data.Sql.Query.TablePlan.RightPlan
getprivate set

Definition at line 61 of file TablePlan.cs.

string [] Deveel.Data.Sql.Query.TablePlan.UniqueNames
getprivate set

The list of unique key names of the tables in this plan.

Definition at line 57 of file TablePlan.cs.


The documentation for this class was generated from the following file: