18 using System.Collections.Generic;
26 namespace Deveel.Data.Sql.Statements {
29 TableName = tableName;
30 ColumnNames = columnNames;
31 QueryExpression = queryExpression;
34 public string TableName {
get;
private set; }
36 public IEnumerable<string> ColumnNames {
get;
private set; }
41 var tableName = request.
Query.ResolveTableName(TableName);
42 if (tableName == null)
45 var columns =
new string[0];
46 if (ColumnNames != null)
47 columns = ColumnNames.ToArray();
51 var queryPlan = request.
Context.QueryPlanner().PlanQuery(
new QueryInfo(request, QueryExpression));
52 return new Prepared(tableName, columns, queryPlan);
55 #region PreparedInsertStatement
60 TableName = tableName;
61 ColumnNames = columnNames;
62 QueryPlan = queryPlan;
68 ColumnNames = data.
GetValue<
string[]>(
"ColumnNames");
75 public string[] ColumnNames {
get;
private set; }
78 data.
SetValue(
"TableName", TableName);
79 data.
SetValue(
"QueryPlan", QueryPlan);
80 data.
SetValue(
"ColumnNames", ColumnNames);
84 throw new NotImplementedException();
Prepared(ObjectName tableName, string[] columnNames, IQueryPlanNode queryPlan)
static ObjectName Parse(string s)
Parses the given string into a ObjectName object.
override void GetData(SerializeData data)
void SetValue(string key, Type type, object value)
Describes the name of an object within a database.
InsertSelectStatement(string tableName, IEnumerable< string > columnNames, SqlQueryExpression queryExpression)
A node element of a query plan tree. /summary>
Represents the foundation class of SQL statements to be executed.
override void ExecuteStatement(ExecutionContext context)
Prepared(ObjectData data)
object GetValue(string key)
IStatement Prepare(IRequest request)