@cubejs-client/core 0.34.9 → 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/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.9",
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": "9c2ceb36b8663483a7c97c195f55c42fc1701dc9"
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`);