fixed filtering in json columns for postgres #889

This commit is contained in:
SPRINX0\prochazka
2024-09-17 16:42:07 +02:00
parent 5c58c35a64
commit 677f83cc4b
4 changed files with 16 additions and 10 deletions

View File

@@ -84,7 +84,7 @@ const dialect = {
'xml',
],
createColumnViewExpression(columnName, dataType, source, alias) {
createColumnViewExpression(columnName, dataType, source, alias, purpose) {
if (dataType && spatialTypes.includes(dataType.toUpperCase())) {
return {
exprType: 'call',
@@ -100,7 +100,7 @@ const dialect = {
};
}
if (dataType?.toLowerCase() == 'uuid') {
if (dataType?.toLowerCase() == 'uuid' || (purpose == 'filter' && dataType?.toLowerCase()?.startsWith('json'))) {
return {
exprType: 'unaryRaw',
expr: {