55 */
66
77import { PostgresDriver , PostgresDriverConfiguration } from '@cubejs-backend/postgres-driver' ;
8- import { BaseDriver , DownloadTableMemoryData , IndexesSQL , StreamOptions , StreamTableDataWithTypes , TableStructure } from '@cubejs-backend/base-driver' ;
8+ import {
9+ BaseDriver ,
10+ DatabaseStructure ,
11+ DownloadTableMemoryData ,
12+ IndexesSQL ,
13+ StreamOptions ,
14+ StreamTableDataWithTypes ,
15+ TableStructure
16+ } from '@cubejs-backend/base-driver' ;
917import { PoolClient , QueryResult } from 'pg' ;
1018import { reduce } from 'ramda' ;
1119import { Readable } from 'stream' ;
@@ -18,16 +26,6 @@ export type ReadableStreamTableDataWithTypes = StreamTableDataWithTypes & {
1826 rowStream : Readable ;
1927} ;
2028
21- export type SchemaResponse = {
22- [ schema : string ] : {
23- [ schemaObject : string ] : {
24- name : string ;
25- type : string ;
26- attributes : any [ ] ;
27- } [ ] ;
28- }
29- } ;
30-
3129/**
3230 * Materialize driver class.
3331 */
@@ -73,6 +71,7 @@ export class MaterializeDriver extends PostgresDriver {
7371 /**
7472 * Application name to set for the connection.
7573 */
74+ // eslint-disable-next-line camelcase
7675 application_name ?: string ,
7776 } = { } ,
7877 ) {
@@ -175,7 +174,7 @@ export class MaterializeDriver extends PostgresDriver {
175174 return version . split ( ' ' ) [ 0 ] ;
176175 }
177176
178- public async tablesSchema ( ) : Promise < SchemaResponse > {
177+ public async tablesSchema ( ) : Promise < DatabaseStructure > {
179178 const version = await this . getMaterializeVersion ( ) ;
180179 const query = this . informationSchemaQueryWithFilter ( version ) ;
181180
0 commit comments