3using System.Threading.Tasks;
23 private readonly
bool lazy;
40 this.objects = Objects;
72 IEnumerable<IElement> Objects;
84 Objects = V.ChildElements;
86 Objects = S.ChildElements;
94 if (Item is Dictionary<string, IElement> ObjExNihilo)
98 foreach (KeyValuePair<string, IElement> P
in ObjExNihilo)
99 Obj2[P.Key] = P.Value.AssociatedObjectValue;
103 else if (Item is Dictionary<string, object> ObjExNihilo2)
107 foreach (KeyValuePair<string, object> P
in ObjExNihilo2)
108 Obj2[P.Key] = P.Value;
113 await Source.
Insert(this.lazy, Item);
125 if (Result.
Count == 1)
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)))
195 AreEqual(this.objects, O.objects) &&
202 int Result = base.GetHashCode();
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static Task EndBulk()
Ends bulk-processing of data. Must be called once for every call to StartBulk.
static Task StartBulk()
Starts bulk-proccessing of data. Must be followed by a call to EndBulk.
Generic object. Contains a sequence of properties.
A chunked list is a linked list of chunks of objects of type T .
int Count
Number of elements in collection.
void Add(T Item)
Adds an item to the collection.
T[] ToArray()
Returns an array containing all elements of the collection.
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 or created.
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 INSERT ... OBJECT[S] ... 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.
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 int GetHashCode()
InsertObjects(SourceDefinition Source, ElementList Objects, bool Lazy, int Start, int Length, Expression Expression)
Executes an INSERT ... OBJECT[S] ... statement against the object database.
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.
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