Index

Index Decorator

The Index decorator is used to create indexes in the database. It takes an IndexDecoratorInterface object as a parameter.

Parameters of IndexDecoratorInterface

  • indexName:

    • Type: string

    • Description: The name of the index.

  • columns:

    • Type: string[]

    • Description: An array of column names that will be included in the index.

  • tableName:

    • Type: string

    • Description: The name of the table to which the index belongs. If not specified, the index is applied to the current table.

  • options:

    • Type: IndexOptionsDecoratorInterface

    • Description: An object containing additional options for configuring the index.

Last updated