Browse Source

feat: formula - mysql - regex_match

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

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

@ -114,6 +114,13 @@ const mysql2 = {
),
};
},
REGEX_MATCH: async ({ fn, knex, pt, colAlias }: MapFnArgs) => {
const source = (await fn(pt.arguments[0])).builder;
const pattern = (await fn(pt.arguments[1])).builder;
return {
builder: knex.raw(`(${source} REGEXP ${pattern}) ${colAlias}`),
};
},
};
export default mysql2;

Loading…
Cancel
Save