MCPcopy Create free account
hub / github.com/sequelize/sequelize-typescript / Table

Function Table

src/model/table/table.ts:7–14  ·  view source on GitHub ↗
(arg: any)

Source from the content-addressed store, hash-verified

5export function Table<M extends Model = Model>(options: TableOptions<M>): Function;
6export function Table(target: Function): void;
7export function Table(arg: any): void | Function {
8 if (typeof arg === 'function') {
9 annotate(arg);
10 } else {
11 const options: TableOptions = { ...arg };
12 return (target: any) => annotate(target, options);
13 }
14}
15
16function annotate(target: typeof Model, options: TableOptions = {}): void {
17 setModelName(target.prototype, options.modelName || target.name);

Callers 15

model.spec.tsFile · 0.90
UserClass · 0.90
TaskClass · 0.90
ModelAClass · 0.90
User2Class · 0.90
User3Class · 0.90
ParanoidUserClass · 0.90
SettingClass · 0.90
UserHelperClass · 0.90
UserDestroyClass · 0.90
UserDeleteClass · 0.90
ParanoidUser2Class · 0.90

Calls 1

annotateFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…