Browse Source

fix: handle scenarios in which `dt` is not defined

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5797/head
Pranav C 1 year ago
parent
commit
5c5c80d831
  1. 2
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  2. 2
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts
  3. 2
      packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts
  4. 2
      packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts
  5. 2
      packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts

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

@ -832,7 +832,7 @@ export class MssqlUi {
}
static getAbstractType(col): any {
switch ((col.dt || col.dt).toLowerCase()) {
switch (col.dt?.toLowerCase()) {
case 'bigint':
case 'smallint':
case 'bit':

2
packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts

@ -871,7 +871,7 @@ export class MysqlUi {
}
static getAbstractType(col): any {
switch (col.dt.toLowerCase()) {
switch (col.dt?.toLowerCase()) {
case 'int':
case 'smallint':
case 'mediumint':

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

@ -689,7 +689,7 @@ export class OracleUi {
}
static getAbstractType(col): any {
switch ((col.dt || col.dt).toLowerCase()) {
switch (col.dt?.toLowerCase()) {
case 'integer':
return 'integer';
case 'bfile':

2
packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts

@ -1358,7 +1358,7 @@ export class PgUi {
}
static getAbstractType(col): any {
switch ((col.dt || col.dt).toLowerCase()) {
switch (col.dt?.toLowerCase()) {
case 'anyenum':
return 'enum';
case 'anynonarray':

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

@ -572,7 +572,7 @@ export class SnowflakeUi {
}
static getAbstractType(col): any {
switch (col.dt.toUpperCase()) {
switch (col.dt?.toUpperCase()) {
case 'NUMBER':
case 'DECIMAL':
case 'NUMERIC':

Loading…
Cancel
Save