@cubejs-backend/elasticsearch-driver 1.6.32 → 1.6.34
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.
- package/driver/ElasticSearchDriver.js +12 -11
- package/package.json +5 -5
|
@@ -35,18 +35,19 @@ class ElasticSearchDriver extends BaseDriver {
|
|
|
35
35
|
const dataSource =
|
|
36
36
|
config.dataSource ||
|
|
37
37
|
assertDataSource('default');
|
|
38
|
+
const preAggregations = config.preAggregations || false;
|
|
38
39
|
|
|
39
40
|
const auth = {
|
|
40
|
-
username: getEnv('dbUser', { dataSource }),
|
|
41
|
-
password: getEnv('dbPass', { dataSource }),
|
|
41
|
+
username: getEnv('dbUser', { dataSource, preAggregations }),
|
|
42
|
+
password: getEnv('dbPass', { dataSource, preAggregations }),
|
|
42
43
|
};
|
|
43
44
|
if (
|
|
44
|
-
getEnv('elasticApiId', { dataSource }) ||
|
|
45
|
-
getEnv('elasticApiKey', { dataSource })
|
|
45
|
+
getEnv('elasticApiId', { dataSource, preAggregations }) ||
|
|
46
|
+
getEnv('elasticApiKey', { dataSource, preAggregations })
|
|
46
47
|
) {
|
|
47
48
|
auth.apiKey = {
|
|
48
|
-
id: getEnv('elasticApiId', { dataSource }),
|
|
49
|
-
api_key: getEnv('elasticApiKey', { dataSource }),
|
|
49
|
+
id: getEnv('elasticApiId', { dataSource, preAggregations }),
|
|
50
|
+
api_key: getEnv('elasticApiKey', { dataSource, preAggregations }),
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
53
|
|
|
@@ -55,14 +56,14 @@ class ElasticSearchDriver extends BaseDriver {
|
|
|
55
56
|
// their respective documentation.
|
|
56
57
|
this.config = {
|
|
57
58
|
auth,
|
|
58
|
-
url: getEnv('dbUrl', { dataSource }),
|
|
59
|
-
ssl: this.getSslOptions(dataSource),
|
|
59
|
+
url: getEnv('dbUrl', { dataSource, preAggregations }),
|
|
60
|
+
ssl: this.getSslOptions(dataSource, preAggregations),
|
|
60
61
|
openDistro:
|
|
61
|
-
(getEnv('elasticOpenDistro', { dataSource }) || 'false')
|
|
62
|
+
(getEnv('elasticOpenDistro', { dataSource, preAggregations }) || 'false')
|
|
62
63
|
.toLowerCase() === 'true' ||
|
|
63
|
-
getEnv('dbType', { dataSource }) === 'odelasticsearch',
|
|
64
|
+
getEnv('dbType', { dataSource, preAggregations }) === 'odelasticsearch',
|
|
64
65
|
queryFormat:
|
|
65
|
-
getEnv('elasticQueryFormat', { dataSource }) || 'jdbc',
|
|
66
|
+
getEnv('elasticQueryFormat', { dataSource, preAggregations }) || 'jdbc',
|
|
66
67
|
...config,
|
|
67
68
|
};
|
|
68
69
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@cubejs-backend/elasticsearch-driver",
|
|
3
3
|
"description": "Cube.js elasticsearch database driver",
|
|
4
4
|
"author": "Cube Dev, Inc.",
|
|
5
|
-
"version": "1.6.
|
|
5
|
+
"version": "1.6.34",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/cube-js/cube.git",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"driver"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cubejs-backend/base-driver": "1.6.
|
|
27
|
-
"@cubejs-backend/shared": "1.6.
|
|
26
|
+
"@cubejs-backend/base-driver": "1.6.34",
|
|
27
|
+
"@cubejs-backend/shared": "1.6.34",
|
|
28
28
|
"@elastic/elasticsearch": "7.12.0",
|
|
29
29
|
"sqlstring": "^2.3.1"
|
|
30
30
|
},
|
|
31
31
|
"license": "Apache-2.0",
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@cubejs-backend/linter": "1.6.
|
|
33
|
+
"@cubejs-backend/linter": "1.6.34",
|
|
34
34
|
"@types/jest": "^29",
|
|
35
35
|
"jest": "^29",
|
|
36
36
|
"testcontainers": "^10.28.0"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "0db9e700b727993b5afe74e5b34686ae76b3cd89"
|
|
45
45
|
}
|