
Constant filtering
If you need to retrieve entities by their entity primary keys, or verify that entities with particular primary keys exist in the database, the constant filter constraint is the place to go. Filtering entities by their primary keys is the fastest way to access entities in evitaDB.
Entity primary key in set
- argument:int+
a mandatory set of entity primary keys representing the entities to be returned
The constraint limits the list of returned entities by exactly specifying their entity primary keys.
Scope
- argument:enum(LIVE|ARCHIVED)+
mandatory one or more enum arguments representing the scope to be searched for the result
- LIVE - the default scope, which searches the live data for the result
- ARCHIVED - the scope that searches for the result in the archived data.
Unique constraints are only enforced within the same scope. This means that two entities in different scopes can have the same unique attribute value. When you move an entity from one scope to another, the unique constraints within the target scope are checked and if the entity violates the unique constraint, the move is refused.
