Browse Source

feat: formula - mysql - XOR

pull/7019/head
Pranav C 1 year ago
parent
commit
7e2e8a143e
  1. 8
      packages/nocodb/src/db/functionMappings/mysql.ts

8
packages/nocodb/src/db/functionMappings/mysql.ts

@ -138,6 +138,14 @@ const mysql2 = {
), ),
}; };
}, },
XOR: async ({ fn, knex, pt, colAlias }: MapFnArgs) => {
const args = await Promise.all(
pt.arguments.map(async (arg) => `${(await fn(arg)).builder}`),
);
return {
builder: knex.raw(`${args.join(' XOR ')} ${colAlias}`),
};
},
}; };
export default mysql2; export default mysql2;

Loading…
Cancel
Save