Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/typeorm/src/metadata-args/IndexMetadataArgs.ts>IndexMetadataArgs

Forked from https://github.com/typeorm/typeorm
Latest
interface IndexMetadataArgs
import { type IndexMetadataArgs } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/metadata-args/IndexMetadataArgs.ts";

Arguments for IndexMetadata class.

Properties

target: Function | string

Class to which index is applied.

optional
name: string

Index name.

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

Columns combination to be used as index.

optional
unique: boolean

Indicates if index must be unique or not.

optional
spatial: boolean

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

optional
fulltext: boolean

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

optional
where: string

Index filter condition.

optional
synchronize: boolean

Indicates if index must sync with database index.

optional
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.

optional
background: boolean

Builds the index in the background so that building an index an does not block other database activities. This option is only supported for mongodb database.

optional
expireAfterSeconds: number

Specifies a time to live, in seconds. This option is only supported for mongodb database.