Browse Source

Merge pull request #4928 from nocodb/fix/pg-nested-and-or-formula

fix(nocodb): argument of OR/AND must be type boolean, not type integer
pull/4930/head
Raju Udava 2 years ago committed by GitHub
parent
commit
9a322ea644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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