lakutata
Version:
An IoC-based universal application framework.
58 lines (55 loc) • 1.46 kB
TypeScript
import './TypeDef.internal.30.js';
import { SelectQueryBuilder } from './TypeDef.internal.38.js';
import { EntityMetadata } from './TypeDef.internal.47.js';
import { TableIndex } from './TypeDef.internal.78.js';
import { Driver } from './TypeDef.internal.45.js';
import { ViewOptions } from './TypeDef.internal.91.js';
import { DataSource } from './TypeDef.internal.33.js';
/**
* View in the database represented in this class.
*/
declare class View {
readonly "@instanceof": symbol;
/**
* Database name that this view resides in if it applies.
*/
database?: string;
/**
* Schema name that this view resides in if it applies.
*/
schema?: string;
/**
* View name
*/
name: string;
/**
* Indicates if view is materialized.
*/
materialized: boolean;
/**
* View Indices
*/
indices: TableIndex[];
/**
* View definition.
*/
expression: string | ((connection: DataSource) => SelectQueryBuilder<any>);
constructor(options?: ViewOptions);
/**
* Clones this table to a new table with all properties cloned.
*/
clone(): View;
/**
* Add index
*/
addIndex(index: TableIndex): void;
/**
* Remove index
*/
removeIndex(viewIndex: TableIndex): void;
/**
* Creates view from a given entity metadata.
*/
static create(entityMetadata: EntityMetadata, driver: Driver): View;
}
export { View };