Skip to content

@142vip.nest typeorm.类.View

mmdapl edited this page Oct 8, 2026 · 1 revision

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

类: View

定义于: 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/view/View.d.ts:6

View in the database represented in this class.

构造函数

构造函数

new View(options?): View

定义于: 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/view/View.d.ts:32

参数

options?

ViewOptions

返回

View

属性

@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/view/View.d.ts:7


database?

optional database?: 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/view/View.d.ts:11

Database name that this view resides in if it applies.


expression

expression: string | ((connection) => SelectQueryBuilder<any>)

定义于: 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/view/View.d.ts:31

View definition.


indices

indices: TableIndex[]

定义于: 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/view/View.d.ts:27

View Indices


materialized

materialized: boolean

定义于: 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/view/View.d.ts:23

Indicates if view is materialized.


name

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/view/View.d.ts:19

View name


schema?

optional schema?: 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/view/View.d.ts:15

Schema name that this view resides in if it applies.

方法

addIndex()

addIndex(index): void

定义于: 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/view/View.d.ts:40

Add index

参数

index

TableIndex

返回

void


clone()

clone(): View

定义于: 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/view/View.d.ts:36

Clones this table to a new table with all properties cloned.

返回

View


removeIndex()

removeIndex(viewIndex): void

定义于: 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/view/View.d.ts:44

Remove index

参数

viewIndex

TableIndex

返回

void


create()

static create(entityMetadata, driver): View

定义于: 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/view/View.d.ts:48

Creates view from a given entity metadata.

参数

entityMetadata

EntityMetadata

driver

Driver

返回

View

Clone this wiki locally