Browse Source

fix(nocodb): argument of OR/AND must be type boolean, not type integer

pull/4928/head
Wing-Kam Wong 2 years ago
parent
commit
459ef2f1cd
  1. 4
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/pg.ts

4
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/pg.ts

@ -123,7 +123,7 @@ const pg = {
.join(' AND ')}`
)
.wrap('(', ')')
.toQuery()} THEN 1 ELSE 0 END ${args.colAlias}`
.toQuery()} THEN TRUE ELSE FALSE END ${args.colAlias}`
);
},
OR: (args: MapFnArgs) => {
@ -135,7 +135,7 @@ const pg = {
.join(' OR ')}`
)
.wrap('(', ')')
.toQuery()} THEN 1 ELSE 0 END ${args.colAlias}`
.toQuery()} THEN TRUE ELSE FALSE END ${args.colAlias}`
);
},
SUBSTR: ({ fn, knex, pt, colAlias }: MapFnArgs) => {

Loading…
Cancel
Save