Browse Source

fix(nocodb): MOD for postgres

pull/4767/head
Wing-Kam Wong 2 years ago
parent
commit
769e16fe38
  1. 5
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/pg.ts

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

@ -148,6 +148,11 @@ const pg = {
})${colAlias}` })${colAlias}`
); );
}, },
MOD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
const x = fn(pt.arguments[0]);
const y = fn(pt.arguments[1]);
return knex.raw(`MOD((${x})::NUMERIC, (${y})::NUMERIC) ${colAlias}`);
},
}; };
export default pg; export default pg;

Loading…
Cancel
Save