Browse Source

fix: clientType property for custom knex

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/4645/head
mertmit 2 years ago
parent
commit
3ca32b8047
  1. 4
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/CustomKnex.ts

4
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/CustomKnex.ts

@ -1022,7 +1022,9 @@ function CustomKnex(arg: string | Knex.Config<any> | any): CustomKnex {
value: () => {
return typeof arg === 'string'
? arg.match(/^(\w+):/) ?? [1]
: (arg.client?.name === 'SnowflakeClient') ? 'snowflake' : arg.client;
: (typeof arg.client === 'string')
? arg.client
: arg.client?.prototype?.dialect || arg.client?.prototype?.driverName;
},
},
searchPath: {

Loading…
Cancel
Save