Skip to content

Commit 5067c4e

Browse files
committed
fix types in Materialize driver
1 parent 879ea7a commit 5067c4e

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

packages/cubejs-materialize-driver/src/MaterializeDriver.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
*/
66

77
import { 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';
917
import { PoolClient, QueryResult } from 'pg';
1018
import { reduce } from 'ramda';
1119
import { 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

Comments
 (0)