- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
indexes Method - DML Reference
This method defines indices on the data model. An index can be on multiple columns and have conditions.
Example#
An example of a simple index:
To add a condition on the index, use the where
option:
The condition can also be a negation. For example:
In this example, the index is created when the value of age
doesn't equal 30
.
Parameters#
indexes
EntityIndex<Schema, string | QueryCondition<Schema>>[]The index's configuration.
indexes
EntityIndex<Schema, string | QueryCondition<Schema>>[]Was this page helpful?