API 参考
    正在准备搜索索引...

    接口 EntitySchemaIndexOptions

    interface EntitySchemaIndexOptions {
        columns?:
            | string[]
            | ((object?: any) => any[] | { [key: string]: number });
        fulltext?: boolean;
        name?: string;
        nullFiltered?: boolean;
        parser?: string;
        sparse?: boolean;
        spatial?: boolean;
        synchronize?: boolean;
        unique?: boolean;
        where?: string;
    }
    索引

    属性

    columns?: string[] | ((object?: any) => any[] | { [key: string]: number })

    Index column names.

    fulltext?: boolean

    The FULLTEXT modifier indexes the entire column and does not allow prefixing. Works only in MySQL.

    name?: string

    Index name.

    nullFiltered?: boolean

    NULL_FILTERED indexes are particularly useful for indexing sparse columns, where most rows contain a NULL value. In these cases, the NULL_FILTERED index can be considerably smaller and more efficient to maintain than a normal index that includes NULL values.

    Works only in Spanner.

    parser?: string

    Fulltext parser. Works only in MySQL.

    sparse?: boolean

    If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). This option is only supported for mongodb database.

    spatial?: boolean

    The SPATIAL modifier indexes the entire column and does not allow indexed columns to contain NULL values. Works only in MySQL and PostgreSQL.

    synchronize?: boolean

    Indicates if index must sync with database index.

    unique?: boolean

    Indicates if this index must be unique or not.

    where?: string

    Index filter condition.