DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Protected Member Functions | Package Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Statements.CreateViewStatement.Prepared Class Reference
Inheritance diagram for Deveel.Data.Sql.Statements.CreateViewStatement.Prepared:
Deveel.Data.Sql.Statements.SqlStatement Deveel.Data.Sql.Statements.IStatement Deveel.Data.Serialization.ISerializable Deveel.Data.Sql.IExecutable

Protected Member Functions

override void GetData (SerializeData data)
 
override void ExecuteStatement (ExecutionContext context)
 
- Protected Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
 SqlStatement ()
 
 SqlStatement (ObjectData data)
 

Package Functions

 Prepared (ObjectName viewName, SqlQueryExpression queryExpression, IQueryPlanNode queryPlan, bool replaceIfExists)
 
- Package Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
void SetSource (SqlQuery query)
 

Properties

ObjectName ViewName [get, private set]
 
IQueryPlanNode QueryPlan [get, private set]
 
bool ReplaceIfExists [get, set]
 
SqlQueryExpression QueryExpression [get, private set]
 
- Properties inherited from Deveel.Data.Sql.Statements.SqlStatement
SqlQuery SourceQuery [get, set]
 Gets the SqlQuery that is the origin of this statement. More...
 
bool IsFromQuery [get, private set]
 Gets a boolean value indicating if this object was formed from the parsing of a SqlQuery or if it was manually created. More...
 
- Properties inherited from Deveel.Data.Sql.Statements.IStatement
SqlQuery SourceQuery [get]
 

Private Member Functions

 Prepared (ObjectData data)
 

Additional Inherited Members

- Public Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
ITable Execute (IRequest context)
 Prepares and evaluates this statement into a tabular result. More...
 
- Static Public Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
static IEnumerable< SqlStatementParse (string sqlSource)
 Parses a given string into one of more statements. More...
 
static IEnumerable< SqlStatementParse (IContext context, string sqlSource)
 Parses a given string into one of more statements. More...
 
static IEnumerable< SqlStatementParse (IContext context, SqlQuery query)
 

Detailed Description

Definition at line 100 of file CreateViewStatement.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Statements.CreateViewStatement.Prepared.Prepared ( ObjectName  viewName,
SqlQueryExpression  queryExpression,
IQueryPlanNode  queryPlan,
bool  replaceIfExists 
)
inlinepackage
Deveel.Data.Sql.Statements.CreateViewStatement.Prepared.Prepared ( ObjectData  data)
inlineprivate

Member Function Documentation

override void Deveel.Data.Sql.Statements.CreateViewStatement.Prepared.ExecuteStatement ( ExecutionContext  context)
inlineprotectedvirtual

Reimplemented from Deveel.Data.Sql.Statements.SqlStatement.

Definition at line 130 of file CreateViewStatement.cs.

130  {
131  // We have to execute the plan to get the TableInfo that represents the
132  // result of the view execution.
133  var table = QueryPlan.Evaluate(context.Request);
134  var tableInfo = table.TableInfo.Alias(ViewName);
135 
136  var viewInfo = new ViewInfo(tableInfo, QueryExpression, QueryPlan);
137  context.Request.Query.DefineView(viewInfo, ReplaceIfExists);
138  }
ITable Evaluate(IRequest context)
TableInfo Alias(ObjectName alias)
Definition: TableInfo.cs:346
TableInfo TableInfo
Gets the metadata information of the table, used to resolve the column sources.
Definition: ITable.cs:47
override void Deveel.Data.Sql.Statements.CreateViewStatement.Prepared.GetData ( SerializeData  data)
inlineprotectedvirtual

Reimplemented from Deveel.Data.Sql.Statements.SqlStatement.

Definition at line 123 of file CreateViewStatement.cs.

123  {
124  data.SetValue("Name", ViewName);
125  data.SetValue("QueryPlan", QueryPlan);
126  data.SetValue("QueryExpression", QueryExpression);
127  data.SetValue("ReplaceIfExists", ReplaceIfExists);
128  }
void SetValue(string key, Type type, object value)

Property Documentation

SqlQueryExpression Deveel.Data.Sql.Statements.CreateViewStatement.Prepared.QueryExpression
getprivate set

Definition at line 121 of file CreateViewStatement.cs.

IQueryPlanNode Deveel.Data.Sql.Statements.CreateViewStatement.Prepared.QueryPlan
getprivate set

Definition at line 117 of file CreateViewStatement.cs.

bool Deveel.Data.Sql.Statements.CreateViewStatement.Prepared.ReplaceIfExists
getset

Definition at line 119 of file CreateViewStatement.cs.

ObjectName Deveel.Data.Sql.Statements.CreateViewStatement.Prepared.ViewName
getprivate set

Definition at line 115 of file CreateViewStatement.cs.


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