@cubejs-client/core 0.34.2 → 0.34.19
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 +5 -1
- package/dist/cubejs-client-core.esm.js.map +1 -1
- package/dist/cubejs-client-core.js +6 -0
- package/dist/cubejs-client-core.js.map +1 -1
- package/dist/cubejs-client-core.umd.js +6 -0
- package/dist/cubejs-client-core.umd.js.map +1 -1
- package/index.d.ts +7 -0
- package/package.json +2 -2
- package/src/ResultSet.js +4 -0
- package/src/index.js +1 -1
package/index.d.ts
CHANGED
|
@@ -731,6 +731,11 @@ declare module '@cubejs-client/core' {
|
|
|
731
731
|
query(): Query;
|
|
732
732
|
rawData(): T[];
|
|
733
733
|
annotation(): QueryAnnotations;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* @return the total number of rows if the `total` option was set, when sending the query
|
|
737
|
+
*/
|
|
738
|
+
totalRows(): number | null;
|
|
734
739
|
}
|
|
735
740
|
|
|
736
741
|
export type Filter = BinaryFilter | UnaryFilter | LogicalOrFilter | LogicalAndFilter;
|
|
@@ -922,6 +927,7 @@ declare module '@cubejs-client/core' {
|
|
|
922
927
|
measures: string[];
|
|
923
928
|
dimensions: string[];
|
|
924
929
|
};
|
|
930
|
+
format?: 'currency' | 'percent';
|
|
925
931
|
};
|
|
926
932
|
|
|
927
933
|
export type TCubeDimension = BaseCubeMember & {
|
|
@@ -965,6 +971,7 @@ declare module '@cubejs-client/core' {
|
|
|
965
971
|
measures: TCubeMeasure[];
|
|
966
972
|
dimensions: TCubeDimension[];
|
|
967
973
|
segments: TCubeSegment[];
|
|
974
|
+
connectedComponent?: number;
|
|
968
975
|
};
|
|
969
976
|
|
|
970
977
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubejs-client/core",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.19",
|
|
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": "^26.0.1"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "1ed327dcd703686b4f723cb96a7298655eba186d"
|
|
49
49
|
}
|
package/src/ResultSet.js
CHANGED
|
@@ -701,6 +701,10 @@ class ResultSet {
|
|
|
701
701
|
return this.loadResponse.pivotQuery || null;
|
|
702
702
|
}
|
|
703
703
|
|
|
704
|
+
totalRows() {
|
|
705
|
+
return this.loadResponses[0].total;
|
|
706
|
+
}
|
|
707
|
+
|
|
704
708
|
rawData() {
|
|
705
709
|
if (this.queryType !== QUERY_TYPE.REGULAR_QUERY) {
|
|
706
710
|
throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);
|
package/src/index.js
CHANGED
|
@@ -375,5 +375,5 @@ class CubejsApi {
|
|
|
375
375
|
|
|
376
376
|
export default (apiToken, options) => new CubejsApi(apiToken, options);
|
|
377
377
|
|
|
378
|
-
export { CubejsApi, HttpTransport, ResultSet, RequestError, Meta };
|
|
378
|
+
export { CubejsApi, CubejsApi as CubeApi, HttpTransport, ResultSet, RequestError, Meta };
|
|
379
379
|
export * from './utils';
|