Skip to content

@142vip.nest typeorm.类.TableUnique

mmdapl edited this page Oct 8, 2026 · 1 revision

API 参考 / @142vip/nest-typeorm / TableUnique

类: TableUnique

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/schema-builder/table/TableUnique.d.ts:6

Database's table unique constraint stored in this class.

构造函数

构造函数

new TableUnique(options): TableUnique

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/schema-builder/table/TableUnique.d.ts:21

参数

options

TableUniqueOptions

返回

TableUnique

属性

@instanceof

readonly @instanceof: symbol

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/schema-builder/table/TableUnique.d.ts:7


columnNames

columnNames: string[]

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/schema-builder/table/TableUnique.d.ts:15

Columns that contains this constraint.


deferrable?

optional deferrable?: string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/schema-builder/table/TableUnique.d.ts:20

Set this foreign key constraint as "DEFERRABLE" e.g. check constraints at start or at the end of a transaction


name?

optional name?: string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/schema-builder/table/TableUnique.d.ts:11

Constraint name.

方法

clone()

clone(): TableUnique

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/schema-builder/table/TableUnique.d.ts:25

Creates a new copy of this constraint with exactly same properties.

返回

TableUnique


create()

static create(uniqueMetadata): TableUnique

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/schema-builder/table/TableUnique.d.ts:29

Creates unique from the unique metadata object.

参数

uniqueMetadata

UniqueMetadata

返回

TableUnique

Clone this wiki locally