2using System.Collections.Generic;
3using System.Threading.Tasks;
40 this.objects = Objects;
43 this.operation = Operation;
71 IEnumerable<IElement> Objects;
80 Objects = V.ChildElements;
82 Objects = S.ChildElements;
90 if (Item is Dictionary<string, IElement> ObjExNihilo)
94 foreach (KeyValuePair<string, IElement> P
in ObjExNihilo)
95 Obj2[P.Key] = P.Value.AssociatedObjectValue;
99 else if (Item is Dictionary<string, object> ObjExNihilo2)
103 foreach (KeyValuePair<string, object> P
in ObjExNihilo2)
104 Obj2[P.Key] = P.Value;
109 switch (this.operation)
152 if (!(this.source is
null))
154 b = !Callback(this.source, out NewNode, State);
157 this.source = Source2;
161 if (b || (Order ==
SearchMethod.TreeOrder && !
this.source.ForAllChildNodes(Callback, State, Order)))
165 if (!(this.objects is
null))
167 b = !Callback(this.objects, out NewNode, State);
168 if (!(NewNode is
null) && NewNode is
ElementList NewObjects)
170 this.objects = NewObjects;
174 if (b || (Order ==
SearchMethod.TreeOrder && !
this.objects.ForAllChildNodes(Callback, State, Order)))
194 this.operation == O.operation &&
196 AreEqual(this.objects, O.objects) &&
203 int Result = base.GetHashCode();
204 Result ^= Result << 5 ^ this.operation.GetHashCode();
Static interface for ledger persistence. In order to work, a ledger provider has to be assigned to it...
static async Task DeletedEntry(object Object)
Deletes an entry in the ledger.
static async Task NewEntry(object Object)
Adds an entry to the ledger.
static async Task UpdatedEntry(object Object)
Updates an entry in the ledger.
Generic object. Contains a sequence of properties.
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 list of elements.
ScriptNode[] Elements
Elements.
Executes an RECORD ... OBJECT[S] ... statement against the ledger.
RecordObjects(SourceDefinition Source, RecordOperation Operation, ElementList Objects, int Start, int Length, Expression Expression)
Executes an RECORD ... OBJECT[S] ... statement against the ledger.
override int GetHashCode()
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node asynchronously, 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.
override bool Equals(object obj)
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.
Basic interface for vectors.
Basic interface for all types of sets.
Interface for script nodes with asynchronous evaluation
Interface for data sources that can be used in SQL statements.
delegate bool ScriptNodeEventHandler(ScriptNode Node, out ScriptNode NewNode, object State)
Delegate for ScriptNode callback methods.
SearchMethod
Method to traverse the expression structure
RecordOperation
Ledger operation to record.