Documentation
    Preparing search index...

    Interface AttributeIndexOptions

    interface AttributeIndexOptions {
        attribute?: Omit<IndexField, "name">;
        concurrently?: boolean;
        include?: Literal | (string | Literal)[];
        msg?: string;
        name?: string;
        operator?: string;
        parser?: string | null;
        prefix?: string;
        type?: IndexType;
        unique?: boolean;
        using?: string;
        where?: WhereOptions;
    }

    Hierarchy

    Index
    attribute?: Omit<IndexField, "name">

    Configures the options for this index attribute.

    concurrently?: boolean

    PostgreSQL will build the index without taking any write locks. Postgres only.

    false
    
    include?: Literal | (string | Literal)[]

    Non-key columns to be added to the lead level of the nonclustered index.

    msg?: string

    The message to display if the unique constraint is violated.

    name?: string

    The name of the index. Defaults to model name + _ + fields concatenated

    operator?: string

    Index operator type. Postgres only

    parser?: string | null

    For FULLTEXT columns set your parser

    prefix?: string

    Prefix to append to the index name.

    type?: IndexType

    Index type. Only used by mysql. One of UNIQUE, FULLTEXT and SPATIAL

    unique?: boolean

    Should the index be unique? Can also be triggered by setting type to UNIQUE

    false
    
    using?: string

    The method to create the index by (USING statement in SQL). BTREE and HASH are supported by mysql and postgres. Postgres additionally supports GIST, SPGIST, BRIN and GIN.

    where?: WhereOptions

    Optional where parameter for index. Can be used to limit the index to certain rows.