Behavioral require containers
Special behavioural require constraint containers are used to define a require constraint scope.
In Scope
- argument:enum(LIVE|ARCHIVED)
mandatory enum argument representing the scope to which the require constraints in the second and subsequent arguments are applied
- requireConstraint:any+
one or more mandatory require conditions, combined by a logical link, used to require entities only in a specific scope
The evitaDB query engine is strict about indexes and does not allow you to require or sort on data (attributes, references, etc.) for which no index has been prepared in advance (it tries to avoid situations where a full scan would degrade query performance). Scopes, on the other hand, allows us to get rid of unnecessary indexes when we know we will not need them (archived data is not expected to be queried as extensively as live data) and free up some resources for more important tasks.
As you can see, the result contains calculations for the data that the engine can calculate.