Indexes
An example of adding an index to my ORM system
Indexes help speed up data retrieval in a table, especially when working with large datasets. In my ORM system, indexes can be added using the @Index
decorator.
An example of adding an index to the user table
In this example, we create a unique index named user_index
on the username
and email
columns in the users
table. The index ensures that each combination of these fields is unique, helping to prevent duplicates.
Last updated