@sourceloop/reporting-service / Exports / MysqlSequelizeStrategy
Class: MysqlSequelizeStrategy¶
Hierarchy¶
-
↳
MysqlSequelizeStrategy
Table of contents¶
Constructors¶
Properties¶
Methods¶
- applyRowLevelFilter
- checkIfColumnsExists
- checkIfDataSourceExists
- listDataSourceColumns
- listdataSources
- manageRecord
- query
- sanitizeValue
- translateQuery
Constructors¶
constructor¶
• new MysqlSequelizeStrategy(sequelizeObj
, logger
, queryUtility
)
Parameters¶
Name | Type |
---|---|
sequelizeObj |
Sequelize |
logger |
ILogger |
queryUtility |
QueryUtilityInterface |
Overrides¶
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:16
Properties¶
logger¶
• logger: ILogger
Inherited from¶
Defined in¶
services/reporting-service/src/strategies/sequelize/base-sequelize.ts:16
sequelize¶
• sequelize: Sequelize
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:15
sequilizeQuertUtility¶
• sequilizeQuertUtility: QueryUtilityInterface
Inherited from¶
BaseSequelize.sequilizeQuertUtility
Defined in¶
services/reporting-service/src/strategies/sequelize/base-sequelize.ts:17
Methods¶
applyRowLevelFilter¶
▸ applyRowLevelFilter(initialQuery
): Promise
<StructuredQueryInterface
>
Parameters¶
Name | Type |
---|---|
initialQuery |
StructuredQueryInterface |
Returns¶
Promise
<StructuredQueryInterface
>
Overrides¶
BaseSequelize.applyRowLevelFilter
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:44
checkIfColumnsExists¶
▸ checkIfColumnsExists(columnEntityPairs
): Promise
<boolean
>
Parameters¶
Name | Type |
---|---|
columnEntityPairs |
ColumnEntityPair [] |
Returns¶
Promise
<boolean
>
Overrides¶
BaseSequelize.checkIfColumnsExists
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:39
checkIfDataSourceExists¶
▸ checkIfDataSourceExists(dataSourceNames
): Promise
<boolean
>
Parameters¶
Name | Type |
---|---|
dataSourceNames |
string [] |
Returns¶
Promise
<boolean
>
Overrides¶
BaseSequelize.checkIfDataSourceExists
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:36
listDataSourceColumns¶
▸ listDataSourceColumns(dataSource
): Promise
<ColumnForDataSourceModel
[]>
Parameters¶
Name | Type |
---|---|
dataSource |
string |
Returns¶
Promise
<ColumnForDataSourceModel
[]>
Overrides¶
BaseSequelize.listDataSourceColumns
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:30
listdataSources¶
▸ listdataSources(): Promise
<DataSourceList
[]>
Returns¶
Promise
<DataSourceList
[]>
Overrides¶
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:24
manageRecord¶
▸ manageRecord(dataSource
, data
, identifier?
): Promise
<AnyObject
>
Parameters¶
Name | Type | Default value |
---|---|---|
dataSource |
string |
undefined |
data |
IngestReportRecord |
undefined |
identifier |
string |
'id' |
Returns¶
Promise
<AnyObject
>
Overrides¶
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:49
query¶
▸ query(queryObject
): Promise
<AnyObject
[]>
Parameters¶
Name | Type |
---|---|
queryObject |
StructuredQueryInterface |
Returns¶
Promise
<AnyObject
[]>
Overrides¶
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:27
sanitizeValue¶
▸ sanitizeValue(value
): JSONValueType
Parameters¶
Name | Type |
---|---|
value |
JSONValueType |
Returns¶
Inherited from¶
Defined in¶
services/reporting-service/src/strategies/sequelize/base-sequelize.ts:23
translateQuery¶
▸ translateQuery(queryObject
): Promise
<{ bind
: AnyObject
; query
: string
}>
Parameters¶
Name | Type |
---|---|
queryObject |
StructuredQueryInterface |
Returns¶
Promise
<{ bind
: AnyObject
; query
: string
}>
Overrides¶
Defined in¶
services/reporting-service/src/strategies/sequelize/mysql-sequelize-strategy.ts:57