@cubejs-client/core 0.35.0 → 0.35.23
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/dist/cubejs-client-core.esm.js +91 -253
- package/dist/cubejs-client-core.esm.js.map +1 -1
- package/dist/cubejs-client-core.js +104 -395
- package/dist/cubejs-client-core.js.map +1 -1
- package/dist/cubejs-client-core.umd.js +104 -395
- package/dist/cubejs-client-core.umd.js.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/index.js +11 -0
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubejs-client/core",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.23",
|
|
4
4
|
"engines": {},
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"eslint-plugin-node": "^5.2.1",
|
|
46
46
|
"jest": "^27"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "50ddcfc277feb55a8781129e7b3a5579e00ea334"
|
|
49
49
|
}
|
package/src/index.js
CHANGED
|
@@ -56,6 +56,7 @@ class CubeApi {
|
|
|
56
56
|
});
|
|
57
57
|
this.pollInterval = options.pollInterval || 5;
|
|
58
58
|
this.parseDateMeasures = options.parseDateMeasures;
|
|
59
|
+
this.castNumerics = typeof options.castNumerics === 'boolean' ? options.castNumerics : false;
|
|
59
60
|
|
|
60
61
|
this.updateAuthorizationPromise = null;
|
|
61
62
|
}
|
|
@@ -308,6 +309,11 @@ class CubeApi {
|
|
|
308
309
|
}
|
|
309
310
|
|
|
310
311
|
load(query, options, callback, responseFormat = ResultType.DEFAULT) {
|
|
312
|
+
options = {
|
|
313
|
+
castNumerics: this.castNumerics,
|
|
314
|
+
...options
|
|
315
|
+
};
|
|
316
|
+
|
|
311
317
|
if (responseFormat === ResultType.COMPACT) {
|
|
312
318
|
if (Array.isArray(query)) {
|
|
313
319
|
query = query.map((q) => this.patchQueryInternal(q, ResultType.COMPACT));
|
|
@@ -327,6 +333,11 @@ class CubeApi {
|
|
|
327
333
|
}
|
|
328
334
|
|
|
329
335
|
subscribe(query, options, callback, responseFormat = ResultType.DEFAULT) {
|
|
336
|
+
options = {
|
|
337
|
+
castNumerics: this.castNumerics,
|
|
338
|
+
...options
|
|
339
|
+
};
|
|
340
|
+
|
|
330
341
|
if (responseFormat === ResultType.COMPACT) {
|
|
331
342
|
if (Array.isArray(query)) {
|
|
332
343
|
query = query.map((q) => this.patchQueryInternal(q, ResultType.COMPACT));
|