-
Notifications
You must be signed in to change notification settings - Fork 70
/
mysql-sequelize-strategy.ts
62 lines (60 loc) · 1.77 KB
/
mysql-sequelize-strategy.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import {AnyObject} from '@loopback/repository';
import {ILogger} from '@sourceloop/core';
import {Sequelize} from 'sequelize';
import {
ColumnEntityPair,
ColumnForDataSourceModel,
DataSourceList,
IngestReportRecord,
QueryUtilityInterface,
StructuredQueryInterface,
} from '../../interfaces';
import {BaseSequelize} from '../sequelize/base-sequelize';
const METHOD_NOT_IMPLEMENTED = 'Method not implemented.';
export class MysqlSequelizeStrategy extends BaseSequelize {
sequelize: Sequelize;
constructor(
sequelizeObj: Sequelize,
logger: ILogger,
queryUtility: QueryUtilityInterface,
) {
super(logger, queryUtility);
this.sequelize = sequelizeObj;
}
async listdataSources(): Promise<DataSourceList[]> {
throw new Error(METHOD_NOT_IMPLEMENTED);
}
query(queryObject: StructuredQueryInterface): Promise<AnyObject[]> {
throw new Error(METHOD_NOT_IMPLEMENTED);
}
listDataSourceColumns(
dataSource: string,
): Promise<ColumnForDataSourceModel[]> {
throw new Error(METHOD_NOT_IMPLEMENTED);
}
checkIfDataSourceExists(dataSourceNames: string[]): Promise<boolean> {
throw new Error(METHOD_NOT_IMPLEMENTED);
}
checkIfColumnsExists(
columnEntityPairs: ColumnEntityPair[],
): Promise<boolean> {
throw new Error(METHOD_NOT_IMPLEMENTED);
}
applyRowLevelFilter(
initialQuery: StructuredQueryInterface,
): Promise<StructuredQueryInterface> {
throw new Error(METHOD_NOT_IMPLEMENTED);
}
async manageRecord(
dataSource: string,
data: IngestReportRecord,
identifier = 'id',
): Promise<AnyObject> {
throw new Error(METHOD_NOT_IMPLEMENTED);
}
translateQuery(
queryObject: StructuredQueryInterface,
): Promise<{query: string; bind: AnyObject}> {
throw new Error(METHOD_NOT_IMPLEMENTED);
}
}