@lightdash/warehouses 0.2046.0 → 0.2047.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,6 +36,7 @@ export declare class BigquerySqlBuilder extends WarehouseBaseSqlBuilder {
36
36
  getAdapterType(): SupportedDbtAdapter;
37
37
  getMetricSql(sql: string, metric: Metric): string;
38
38
  getFieldQuoteChar(): string;
39
+ getFloatingType(): string;
39
40
  escapeString(value: string): string;
40
41
  }
41
42
  export declare class BigqueryWarehouseClient extends WarehouseBaseClient<CreateBigqueryCredentials> {
@@ -94,6 +94,9 @@ class BigquerySqlBuilder extends WarehouseBaseSqlBuilder_1.default {
94
94
  getFieldQuoteChar() {
95
95
  return '`';
96
96
  }
97
+ getFloatingType() {
98
+ return 'FLOAT64';
99
+ }
97
100
  escapeString(value) {
98
101
  if (typeof value !== 'string') {
99
102
  return value;
@@ -39,6 +39,7 @@ export declare class TrinoSqlBuilder extends WarehouseBaseSqlBuilder {
39
39
  getAdapterType(): SupportedDbtAdapter;
40
40
  getEscapeStringQuoteChar(): string;
41
41
  getMetricSql(sql: string, metric: Metric): string;
42
+ getFloatingType(): string;
42
43
  escapeString(value: string): string;
43
44
  }
44
45
  export declare class TrinoWarehouseClient extends WarehouseBaseClient<CreateTrinoCredentials> {
@@ -139,6 +139,9 @@ class TrinoSqlBuilder extends WarehouseBaseSqlBuilder_1.default {
139
139
  return super.getMetricSql(sql, metric);
140
140
  }
141
141
  }
142
+ getFloatingType() {
143
+ return 'DOUBLE';
144
+ }
142
145
  escapeString(value) {
143
146
  if (typeof value !== 'string') {
144
147
  return value;
@@ -8,6 +8,7 @@ export default abstract class WarehouseBaseClient<T extends CreateWarehouseCrede
8
8
  getStringQuoteChar(): string;
9
9
  getEscapeStringQuoteChar(): string;
10
10
  getFieldQuoteChar(): string;
11
+ getFloatingType(): string;
11
12
  abstract getCatalog(config: {
12
13
  database: string;
13
14
  schema: string;
@@ -18,6 +18,9 @@ class WarehouseBaseClient {
18
18
  getFieldQuoteChar() {
19
19
  return this.sqlBuilder.getFieldQuoteChar();
20
20
  }
21
+ getFloatingType() {
22
+ return this.sqlBuilder.getFloatingType();
23
+ }
21
24
  async getAsyncQueryResults(_args, _rowFormatter) {
22
25
  throw new common_1.NotImplementedError(`Paginated query results are not supported for warehouse type: ${this.getAdapterType()}`);
23
26
  }
@@ -7,6 +7,7 @@ export default abstract class WarehouseBaseSqlBuilder implements WarehouseSqlBui
7
7
  getFieldQuoteChar(): string;
8
8
  getStringQuoteChar(): string;
9
9
  getEscapeStringQuoteChar(): string;
10
+ getFloatingType(): string;
10
11
  getMetricSql(sql: string, metric: Metric): string;
11
12
  concatString(...args: string[]): string;
12
13
  escapeString(value: string): string;
@@ -17,6 +17,9 @@ class WarehouseBaseSqlBuilder {
17
17
  getEscapeStringQuoteChar() {
18
18
  return '\\';
19
19
  }
20
+ getFloatingType() {
21
+ return 'FLOAT';
22
+ }
20
23
  getMetricSql(sql, metric) {
21
24
  return (0, sql_1.getDefaultMetricSql)(sql, metric.type);
22
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/warehouses",
3
- "version": "0.2046.0",
3
+ "version": "0.2047.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "snowflake-sdk": "~2.1.3",
18
18
  "ssh2": "^1.14.0",
19
19
  "trino-client": "0.2.6",
20
- "@lightdash/common": "0.2046.0"
20
+ "@lightdash/common": "0.2047.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/pg": "^8.11.10",