2using System.Collections.Generic;
3using System.Threading.Tasks;
22 private readonly
bool lazy;
39 this.objects = Objects;
70 List<IElement> Result =
new List<IElement>();
71 IEnumerable<IElement> Objects;
83 Objects = V.ChildElements;
85 Objects = S.ChildElements;
93 if (Item is Dictionary<string, IElement> ObjExNihilo)
97 foreach (KeyValuePair<string, IElement> P
in ObjExNihilo)
98 Obj2[P.Key] = P.Value.AssociatedObjectValue;
102 else if (Item is Dictionary<string, object> ObjExNihilo2)
106 foreach (KeyValuePair<string, object> P
in ObjExNihilo2)
107 Obj2[P.Key] = P.Value;
112 await Source.
Insert(this.lazy, Item);
124 if (Result.Count == 1)
151 if (!(this.source is
null))
153 b = !Callback(this.source, out NewNode, State);
156 this.source = Source2;
160 if (b || (Order ==
SearchMethod.TreeOrder && !
this.source.ForAllChildNodes(Callback, State, Order)))
164 if (!(this.objects is
null))
166 b = !Callback(this.objects, out NewNode, State);
167 if (!(NewNode is
null) && NewNode is
ElementList NewObjects)
169 this.objects = NewObjects;
173 if (b || (Order ==
SearchMethod.TreeOrder && !
this.objects.ForAllChildNodes(Callback, State, Order)))
194 AreEqual(this.objects, O.objects) &&
201 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.
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 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