@cubejs-client/core 0.34.9 → 0.34.24

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;
@@ -900,7 +905,12 @@ declare module '@cubejs-client/core' {
900
905
  name: string;
901
906
  title: string;
902
907
  shortTitle: string;
908
+ description?: string;
909
+ /**
910
+ * @deprecated use `public` instead
911
+ */
903
912
  isVisible?: boolean;
913
+ public?: boolean;
904
914
  meta?: any;
905
915
  };
906
916
 
@@ -909,7 +919,12 @@ declare module '@cubejs-client/core' {
909
919
  name: string;
910
920
  title: string;
911
921
  shortTitle: string;
922
+ description?: string;
923
+ /**
924
+ * @deprecated use `public` instead
925
+ */
912
926
  isVisible?: boolean;
927
+ public?: boolean;
913
928
  meta?: any;
914
929
  };
915
930
 
@@ -922,9 +937,11 @@ declare module '@cubejs-client/core' {
922
937
  measures: string[];
923
938
  dimensions: string[];
924
939
  };
940
+ format?: 'currency' | 'percent';
925
941
  };
926
942
 
927
943
  export type TCubeDimension = BaseCubeMember & {
944
+ primaryKey?: boolean;
928
945
  suggestFilterValues: boolean;
929
946
  };
930
947
 
@@ -962,9 +979,17 @@ declare module '@cubejs-client/core' {
962
979
  export type Cube = {
963
980
  name: string;
964
981
  title: string;
982
+ description?: string;
965
983
  measures: TCubeMeasure[];
966
984
  dimensions: TCubeDimension[];
967
985
  segments: TCubeSegment[];
986
+ connectedComponent?: number;
987
+ type?: 'view' | 'cube';
988
+ /**
989
+ * @deprecated use `public` instead
990
+ */
991
+ isVisible?: boolean;
992
+ public?: boolean;
968
993
  };
969
994
 
970
995
 
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.24",
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": "7826780cb993e6ebf56d9cd69c7ab156a0b63859"
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`);