bulk inserter - fixes for mysql and postgres

This commit is contained in:
Jan Prochazka
2020-09-28 14:33:47 +02:00
parent 29a7b68b59
commit 6548400b96
6 changed files with 13 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ class PostgreAnalyser extends DatabaseAnalayser {
if (this.singleObjectFilter) {
const { typeField, schemaName, pureName } = this.singleObjectFilter;
if (!typeFields || !typeFields.includes(typeField)) return null;
res = res.replace(/=OBJECT_ID_CONDITION/g, ` = '${typeField}:${schemaName}.${pureName}'`);
res = res.replace(/=OBJECT_ID_CONDITION/g, ` = '${typeField}:${schemaName || 'public'}.${pureName}'`);
return res;
}
if (!this.modifications || !typeFields || this.modifications.length == 0) {