@eggjs/dal-decorator
Version:
tegg dal decorator
52 lines (51 loc) • 1.63 kB
TypeScript
import type { CompressionType, EggProtoImplClass, InsertMethod, RowFormat } from '@eggjs/tegg-types';
import { ColumnModel } from './ColumnModel';
import { IndexModel } from './IndexModel';
export declare class TableModel<T = object> {
clazz: EggProtoImplClass<T>;
name: string;
columns: Array<ColumnModel>;
indices: Array<IndexModel>;
dataSourceName: string;
comment?: string;
autoExtendSize?: number;
autoIncrement?: number;
avgRowLength?: number;
characterSet?: string;
collate?: string;
compression?: CompressionType;
encryption?: boolean;
engine?: string;
engineAttribute?: string;
insertMethod?: InsertMethod;
keyBlockSize?: number;
maxRows?: number;
minRows?: number;
rowFormat?: RowFormat;
secondaryEngineAttribute?: string;
constructor(params: {
clazz: EggProtoImplClass<T>;
name: string;
dataSourceName: string;
columns: Array<ColumnModel>;
indices: Array<IndexModel>;
comment?: string;
autoExtendSize?: number;
autoIncrement?: number;
avgRowLength?: number;
characterSet?: string;
collate?: string;
compression?: CompressionType;
encryption?: boolean;
engine?: string;
engineAttribute?: string;
insertMethod?: InsertMethod;
keyBlockSize?: number;
maxRows?: number;
minRows?: number;
rowFormat?: RowFormat;
secondaryEngineAttribute?: string;
});
getPrimary(): IndexModel | undefined;
static build<T>(clazz: EggProtoImplClass<T>): TableModel<T>;
}