new(kb.gblib): added postgres.
This commit is contained in:
parent
4298303ea4
commit
ded9026e91
1 changed files with 5 additions and 8 deletions
|
@ -300,6 +300,11 @@ export class GBVMService extends GBService {
|
||||||
// Convert all table names to lowercase
|
// Convert all table names to lowercase
|
||||||
freezeTableName: true,
|
freezeTableName: true,
|
||||||
hooks: {
|
hooks: {
|
||||||
|
beforeFind: (options) => {
|
||||||
|
if (options.where) {
|
||||||
|
options.where = toLowerCase(options.where);
|
||||||
|
}
|
||||||
|
},
|
||||||
beforeDefine: (attributes, options) => {
|
beforeDefine: (attributes, options) => {
|
||||||
// Convert model name and table name to lowercase
|
// Convert model name and table name to lowercase
|
||||||
if (options.modelName) {
|
if (options.modelName) {
|
||||||
|
@ -320,14 +325,6 @@ export class GBVMService extends GBService {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Convert query attributes to lowercase
|
|
||||||
hooks: {
|
|
||||||
beforeFind: (options) => {
|
|
||||||
if (options.where) {
|
|
||||||
options.where = toLowerCase(options.where);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue