Browse Source

fix: cdf remove cast type part

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/7164/head
mertmit 1 year ago
parent
commit
40757a5057
  1. 4
      packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts
  2. 4
      packages/nocodb/src/db/sql-client/lib/pg/YugabyteClient.ts

4
packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts

@ -891,7 +891,9 @@ class PGClient extends KnexClient {
// column['unique'] = response.rows[i]['cst'].indexOf('UNIQUE') === -1 ? false : true;
column.cdf = response.rows[i].cdf
? response.rows[i].cdf.replace(/::[\w ]+$/, '').replace(/^'|'$/g, '')
? response.rows[i].cdf
.replace(/::[\w (),]+$/, '')
.replace(/^'|'$/g, '')
: response.rows[i].cdf;
// todo : need to find column comment

4
packages/nocodb/src/db/sql-client/lib/pg/YugabyteClient.ts

@ -119,7 +119,9 @@ class YBClient extends PGClient {
// column['unique'] = response.rows[i]['cst'].indexOf('UNIQUE') === -1 ? false : true;
column.cdf = response.rows[i].cdf
? response.rows[i].cdf.replace(/::[\w ]+$/, '').replace(/^'|'$/g, '')
? response.rows[i].cdf
.replace(/::[\w (),]+$/, '')
.replace(/^'|'$/g, '')
: response.rows[i].cdf;
// todo : need to find column comment

Loading…
Cancel
Save