2using System.Threading.Tasks;
20 private readonly
int nrFields;
21 private readonly
bool lazy;
37 throw new ArgumentException(
"Column and Value lists must have the same lengths.", nameof(Values));
42 this.columns = Columns;
82 for (i = 0; i < this.nrFields; i++)
92 await Source.
Insert(this.lazy, Obj);
107 return Ref.VariableName;
142 if (!(this.source is
null))
144 b = !Callback(this.source, out NewNode, State);
147 this.source = Source2;
151 if (b || (Order ==
SearchMethod.TreeOrder && !
this.source.ForAllChildNodes(Callback, State, Order)))
155 if (!(this.columns is
null))
157 b = !Callback(this.columns, out NewNode, State);
158 if (!(NewNode is
null) && NewNode is
ElementList NewColumns)
160 this.columns = NewColumns;
164 if (b || (Order ==
SearchMethod.TreeOrder && !
this.columns.ForAllChildNodes(Callback, State, Order)))
168 if (!(this.values is
null))
170 b = !Callback(this.values, out NewNode, State);
171 if (!(NewNode is
null) && NewNode is
ElementList NewValues)
173 this.values = NewValues;
177 if (b || (Order ==
SearchMethod.TreeOrder && !
this.values.ForAllChildNodes(Callback, State, Order)))
201 AreEqual(this.columns, O.columns) &&
209 int Result = base.GetHashCode();
Generic object. Contains a sequence of properties.
Script runtime exception.
Class managing a script expression.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
static bool AreEqual(ScriptNode S1, ScriptNode S2)
Compares if two script nodes are equal.
int Start
Start position in script expression.
void SetParent(ScriptNode Parent)
Sets the parent node. Can only be used when expression is being parsed.
virtual Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
Represents a variable reference.
Represents a list of elements.
ScriptNode[] Elements
Elements.
Executes an INSERT ... VALUES ... statement against the object database.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
Calls the callback method for all child nodes.
static async Task< string > GetNameAsync(ScriptNode Node, Variables Variables)
Gets a name from a script node, either by using the name of a variable reference, or evaluating the n...
override bool Equals(object obj)
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override int GetHashCode()
InsertValues(SourceDefinition Source, ElementList Columns, ElementList Values, bool Lazy, int Start, int Length, Expression Expression)
Executes an INSERT ... VALUES ... statement against the object database.
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node asynchronously, using the variables provided in the Variables collection.
Abstract base class for source definitions
abstract Task< IDataSource > GetSource(Variables Variables)
Gets the actual data source, from its definition.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Interface for script nodes with asynchronous evaluation
Interface for data sources that can be used in SQL statements.
string TypeName
Name of corresponding type.
string CollectionName
Name of corresponding collection.
Task Insert(bool Lazy, object Object)
Inserts an object.
delegate bool ScriptNodeEventHandler(ScriptNode Node, out ScriptNode NewNode, object State)
Delegate for ScriptNode callback methods.
SearchMethod
Method to traverse the expression structure