fix analyser for redfshift

This commit is contained in:
Jan Prochazka 2021-09-16 12:58:43 +02:00
parent 81fbed7a7f
commit e5b47baee3
2 changed files with 10 additions and 2 deletions

View File

@ -67,8 +67,12 @@ class Analyser extends DatabaseAnalyser {
? await this.driver.query(this.pool, this.createQuery('matviewColumns', ['matviews']))
: null;
const routines = await this.driver.query(this.pool, this.createQuery('routines', ['procedures', 'functions']));
const indexes = await this.driver.query(this.pool, this.createQuery('indexes', ['tables']));
const indexcols = await this.driver.query(this.pool, this.createQuery('indexcols', ['tables']));
const indexes = this.driver.__analyserInternals.skipIndexes
? { rows: [] }
: await this.driver.query(this.pool, this.createQuery('indexes', ['tables']));
const indexcols = this.driver.__analyserInternals.skipIndexes
? { rows: [] }
: await this.driver.query(this.pool, this.createQuery('indexcols', ['tables']));
const uniqueNames = await this.driver.query(this.pool, this.createQuery('uniqueNames', ['tables']));
return {

View File

@ -83,6 +83,10 @@ const redshiftDriver = {
...dialect,
stringAgg: false,
},
__analyserInternals: {
refTableCond: '',
skipIndexes: true,
},
engine: 'redshift@dbgate-plugin-postgres',
title: 'Amazon Redshift',
defaultPort: 5439,