- Preparing search index...
- The search index is not available
Documentation
Constructors
constructor
- new DbService(_sequelize: Sequelize, modelService: ModelService): DbService
-
Properties
migration_options
modelService
sequelize
sequelize: Sequelize
Methods
cmpTablesByRefInModel
- cmpTablesByRefInModel(sequelize: Sequelize, modelService: ModelService): ((table1_name_str: string, table2_name_str: string) => 0 | 1 | -1)
-
Returns ((table1_name_str: string, table2_name_str: string) => 0 | 1 | -1)
-
- (table1_name_str: string, table2_name_str: string): 0 | 1 | -1
-
Parameters
-
table1_name_str: string
-
table2_name_str: string
Returns 0 | 1 | -1
compareTablesByReferencesInDb
- compareTablesByReferencesInDb(tables_for_cmp_func: {
[x: string]: TableToModel;
}, modelService: ModelService): ((table1_name_str: string, table2_name_str: string) => 0 | 1 | -1)
-
Returns ((table1_name_str: string, table2_name_str: string) => 0 | 1 | -1)
-
- (table1_name_str: string, table2_name_str: string): 0 | 1 | -1
-
Parameters
-
table1_name_str: string
-
table2_name_str: string
Returns 0 | 1 | -1
Private
generateTableInfo
- generateTableInfo(sequelize: Sequelize, table_schema: string, table_name: string): Promise<SchemaColumns>
-
Parameters
-
sequelize: Sequelize
-
table_schema: string
-
table_name: string
getColumnsConstraintsSchemaInfo
- getColumnsConstraintsSchemaInfo(table_schema: string, table_name: string): string
-
Parameters
-
table_schema: string
-
table_name: string
Returns string
Private
getForeignKeyOptions
- getForeignKeyOptions(sequelize: Sequelize, name: string, table_schema: string): Promise<{
delete_rule: null | string;
update_rule: null | string;
}>
-
Parameters
-
sequelize: Sequelize
-
name: string
-
table_schema: string
Returns Promise<{
delete_rule: null | string;
update_rule: null | string;
}>
getForeignKeyRules
- getForeignKeyRules(sequelize: Sequelize, fk_name: string): Promise<{
delete_rule: string;
update_rule: string;
}>
-
Parameters
-
sequelize: Sequelize
-
fk_name: string
Returns Promise<{
delete_rule: string;
update_rule: string;
}>
Private
getPgColumnsInfo
- getPgColumnsInfo(table_schema: string, table_name: string): string
-
Parameters
-
table_schema: string
-
table_name: string
Returns string
getTableIndexes
- getTableIndexes(table_schema: string, table_name: string, sequelize: Sequelize): Promise<[unknown[], unknown]>
-
Parameters
-
table_schema: string
-
table_name: string
-
sequelize: Sequelize
Returns Promise<[unknown[], unknown]>
parseDefaultValue
- parseDefaultValue(column_info: SchemaColumnType): string
-
Returns string
tableToModelInfo
- tableToModelInfo(sequelize: Sequelize, table_schema: string, table_name: string): Promise<TableToModel>
-
Parameters
-
sequelize: Sequelize
-
table_schema: string
-
table_name: string