Commit 6cabc36d authored by Yan Sushchynski (EPAM)'s avatar Yan Sushchynski (EPAM)
Browse files

fix: search tags

parent e3d5324d
Pipeline #129733 failed with stages
in 22 minutes and 21 seconds
......@@ -57,8 +57,8 @@ const datastorePSQLMapper: object = {
'<': 'lt',
'>': 'gt',
'<=': 'lte',
'>=': 'gte'
'>=': 'gte',
'CONTAINS': 'array_contains'
}
......@@ -227,7 +227,7 @@ export class PostgreSQLDAO extends AbstractJournal {
}
public getQueryFilterSymbolContains(): string {
return '=';
return 'CONTAINS';
}
}
......@@ -394,7 +394,12 @@ class PostgreJSONDataSQLFilter {
}
const psqlOperator = datastorePSQLMapper[this.operator];
filter['data'][psqlOperator] = this.value;
// Prisma for PostgreSQL requires a value to be an array if the operator is 'array_contains'
if (this.operator === 'CONTAINS') {
filter['data'][psqlOperator] = [this.value];
} else {
filter['data'][psqlOperator] = this.value;
}
return filter as FilterExpression;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment