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.InsertStatement.Prepared Class Reference
Inheritance diagram for Deveel.Data.Sql.Statements.InsertStatement.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 tableName, IList< SqlAssignExpression[]> assignments)
 
- Package Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
void SetSource (SqlQuery query)
 

Properties

ObjectName TableName [get, private set]
 
IList< SqlAssignExpression[]> Assignments [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 98 of file InsertStatement.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Statements.InsertStatement.Prepared.Prepared ( ObjectName  tableName,
IList< SqlAssignExpression[]>  assignments 
)
inlinepackage

Definition at line 99 of file InsertStatement.cs.

99  {
100  TableName = tableName;
101  Assignments = assignments;
102  }
Deveel.Data.Sql.Statements.InsertStatement.Prepared.Prepared ( ObjectData  data)
inlineprivate

Definition at line 104 of file InsertStatement.cs.

104  {
105  TableName = data.GetValue<ObjectName>("TableName");
106  int setCount = data.GetInt32("SetCount");
107  var assignmenets = new SqlAssignExpression[setCount][];
108  for (int i = 0; i < setCount; i++) {
109  assignmenets[i] = data.GetValue<SqlAssignExpression[]>(String.Format("Assign[{0}]", i));
110  }
111 
112  Assignments = assignmenets;
113  }
A long string in the system.

Member Function Documentation

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

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

Definition at line 131 of file InsertStatement.cs.

131  {
132  var insertCount = context.Request.Query.InsertIntoTable(TableName, Assignments);
133  context.SetResult(insertCount);
134  }
override void Deveel.Data.Sql.Statements.InsertStatement.Prepared.GetData ( SerializeData  data)
inlineprotectedvirtual

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

Definition at line 119 of file InsertStatement.cs.

119  {
120  data.SetValue("TableName", TableName);
121 
122  int setCount = Assignments.Count;
123  data.SetValue("SetCount", setCount);
124 
125  for (int i = 0; i < setCount; i++) {
126  var set = Assignments[i];
127  data.SetValue(String.Format("Assign[{0}]", i), set);
128  }
129  }
A long string in the system.
void SetValue(string key, Type type, object value)

Property Documentation

IList<SqlAssignExpression[]> Deveel.Data.Sql.Statements.InsertStatement.Prepared.Assignments
getprivate set

Definition at line 117 of file InsertStatement.cs.

ObjectName Deveel.Data.Sql.Statements.InsertStatement.Prepared.TableName
getprivate set

Definition at line 115 of file InsertStatement.cs.


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