Browse Source

fix: mysql - REGEX_EXTRACT - make it case-sensitive by default

pull/7268/head
Pranav C 11 months ago
parent
commit
87ecec0923
  1. 4
      packages/nocodb/src/db/functionMappings/mysql.ts

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

@ -125,7 +125,9 @@ const mysql2 = {
const source = (await fn(pt.arguments[0])).builder; const source = (await fn(pt.arguments[0])).builder;
const pattern = (await fn(pt.arguments[1])).builder; const pattern = (await fn(pt.arguments[1])).builder;
return { return {
builder: knex.raw(`REGEXP_SUBSTR(${source}, ${pattern}) ${colAlias}`), builder: knex.raw(
`REGEXP_SUBSTR(${source}, ${pattern}, 1, 1, 'c') ${colAlias}`,
),
}; };
}, },
REGEX_REPLACE: async ({ fn, knex, pt, colAlias }: MapFnArgs) => { REGEX_REPLACE: async ({ fn, knex, pt, colAlias }: MapFnArgs) => {

Loading…
Cancel
Save