Browse Source

fix: exclude unsupported functions

pull/7019/head
Pranav C 1 year ago
parent
commit
07a552dd56
  1. 7
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  2. 4
      packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts
  3. 4
      packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts
  4. 12
      packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

7
packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts

@ -620,7 +620,8 @@ export class MssqlUi {
} {
const colProp: any = {};
switch (col.uidt) {
case 'ID': {
case 'ID':
{
const isAutoIncId = idType === 'AI';
const isAutoGenId = idType === 'AG';
colProp.dt = isAutoGenId ? 'varchar' : 'int';
@ -628,7 +629,7 @@ export class MssqlUi {
colProp.un = isAutoIncId;
colProp.ai = isAutoIncId;
colProp.rqd = true;
colProp.meta = isAutoGenId ? {ag: 'nc'} : undefined;
colProp.meta = isAutoGenId ? { ag: 'nc' } : undefined;
}
break;
case 'ForeignKey':
@ -908,6 +909,6 @@ export class MssqlUi {
}
static getUnsupportedFnList() {
return [];
return ['XOR', 'REGEX_MATCH', 'REGEX_EXTRACT', 'REGEX_REPLACE', 'VALUE'];
}
}

4
packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts

@ -1,4 +1,4 @@
import { NormalColumnRequestType } from '../Api'
import { NormalColumnRequestType } from '../Api';
import UITypes from '../UITypes';
import { IDType } from './index';
@ -938,7 +938,7 @@ export class OracleUi {
}
static getUnsupportedFnList() {
return [];
return ['XOR', 'REGEX_MATCH', 'REGEX_EXTRACT', 'REGEX_REPLACE', 'VALUE'];
}
}

4
packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts

@ -374,7 +374,7 @@ export class SnowflakeUi {
static columnEditable(colObj) {
return colObj.tn !== '_evolutions' || colObj.tn !== 'nc_evolutions';
}
/*
/*
static extractFunctionName(query) {
const reg =
@ -972,7 +972,7 @@ export class SnowflakeUi {
}
static getUnsupportedFnList() {
return [];
return ['XOR', 'REGEX_MATCH', 'REGEX_EXTRACT', 'REGEX_REPLACE', 'VALUE'];
}
}

12
packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

@ -868,6 +868,16 @@ export class SqliteUi {
}
static getUnsupportedFnList() {
return ['LOG', 'EXP', 'POWER', 'SQRT'];
return [
'LOG',
'EXP',
'POWER',
'SQRT',
'XOR',
'REGEX_MATCH',
'REGEX_EXTRACT',
'REGEX_REPLACE',
'VALUE',
];
}
}

Loading…
Cancel
Save