From 7e2e8a143e920eeb979b627cc45681a0531da4e5 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 22 Nov 2023 07:17:57 +0000 Subject: [PATCH] feat: formula - mysql - XOR --- packages/nocodb/src/db/functionMappings/mysql.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/nocodb/src/db/functionMappings/mysql.ts b/packages/nocodb/src/db/functionMappings/mysql.ts index 36be83317b..0e5f33f320 100644 --- a/packages/nocodb/src/db/functionMappings/mysql.ts +++ b/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;