From 74823830e9455fe66b0ba7758593eaaedf9d8d47 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 22 Nov 2023 07:17:58 +0000 Subject: [PATCH] refactor: exclude unsupported functions --- packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts | 12 +++++++++++- packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts | 2 +- packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts | 14 ++++++++++++-- packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts | 10 +++++++++- packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts | 5 +++++ 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts b/packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts index e6199ecf31..630805770c 100644 --- a/packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts +++ b/packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts @@ -909,6 +909,16 @@ export class MssqlUi { } static getUnsupportedFnList() { - return ['XOR', 'REGEX_MATCH', 'REGEX_EXTRACT', 'REGEX_REPLACE', 'VALUE']; + return [ + 'XOR', + 'REGEX_MATCH', + 'REGEX_EXTRACT', + 'REGEX_REPLACE', + 'VALUE', + 'COUNTA', + 'COUNT', + 'ROUNDDOWN', + 'ROUNDUP', + ]; } } diff --git a/packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts b/packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts index 7e5bc77d17..d8ac043d45 100644 --- a/packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts +++ b/packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts @@ -1289,6 +1289,6 @@ export class MysqlUi { } static getUnsupportedFnList() { - return []; + return ['COUNTA', 'COUNT']; } } diff --git a/packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts b/packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts index 533fe8208b..fb4ee5ac1a 100644 --- a/packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts +++ b/packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts @@ -183,8 +183,8 @@ export class OracleUi { // return ''; // break; // case "longtext": - // return '' // break; + // return '' // case "binary": // return 255; // break; @@ -938,7 +938,17 @@ export class OracleUi { } static getUnsupportedFnList() { - return ['XOR', 'REGEX_MATCH', 'REGEX_EXTRACT', 'REGEX_REPLACE', 'VALUE']; + return [ + 'XOR', + 'REGEX_MATCH', + 'REGEX_EXTRACT', + 'REGEX_REPLACE', + 'VALUE', + 'COUNTA', + 'COUNT', + 'ROUNDDOWN', + 'ROUNDUP', + ]; } } diff --git a/packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts b/packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts index e1bad9e137..676a912274 100644 --- a/packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts +++ b/packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts @@ -972,7 +972,15 @@ export class SnowflakeUi { } static getUnsupportedFnList() { - return ['XOR', 'REGEX_MATCH', 'REGEX_EXTRACT', 'REGEX_REPLACE', 'VALUE']; + return [ + 'XOR', + 'REGEX_MATCH', + 'REGEX_EXTRACT', + 'REGEX_REPLACE', + 'VALUE', + 'COUNTA', + 'COUNT', + ]; } } diff --git a/packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts b/packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts index 0e81c1b86a..bb616eee5d 100644 --- a/packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts +++ b/packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts @@ -878,6 +878,11 @@ export class SqliteUi { 'REGEX_EXTRACT', 'REGEX_REPLACE', 'VALUE', + 'COUNTA', + 'COUNT', + 'ROUNDDOWN', + 'ROUNDUP', + ]; } }