@cubejs-client/core 0.31.0 → 0.31.9

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
@@ -843,6 +843,14 @@ declare module '@cubejs-client/core' {
843
843
  timeElapsed(): string;
844
844
  }
845
845
 
846
+ export interface UnsubscribeObj {
847
+ /**
848
+ * Allows to stop requests in-flight in long polling or web socket subscribe loops.
849
+ * It doesn't cancel any submitted requests to the underlying databases.
850
+ */
851
+ unsubscribe(): Promise<void>;
852
+ }
853
+
846
854
  export type SqlQueryTuple = [string, any[], any];
847
855
 
848
856
  export type SqlData = {
@@ -1045,7 +1053,7 @@ declare module '@cubejs-client/core' {
1045
1053
  query: QueryType,
1046
1054
  options?: LoadMethodOptions,
1047
1055
  callback?: LoadMethodCallback<ResultSet<QueryRecordType<QueryType>>>,
1048
- ): void;
1056
+ ): UnsubscribeObj;
1049
1057
 
1050
1058
  load<QueryType extends DeeplyReadonly<Query | Query[]>>(
1051
1059
  query: QueryType,
@@ -1082,26 +1090,26 @@ declare module '@cubejs-client/core' {
1082
1090
  query: QueryType,
1083
1091
  options: LoadMethodOptions | null,
1084
1092
  callback: LoadMethodCallback<ResultSet<QueryRecordType<QueryType>>>,
1085
- ): void;
1093
+ ): UnsubscribeObj;
1086
1094
 
1087
1095
  sql(query: DeeplyReadonly<Query | Query[]>, options?: LoadMethodOptions): Promise<SqlQuery>;
1088
1096
  /**
1089
1097
  * Get generated SQL string for the given `query`.
1090
1098
  * @param query - [Query object](query-format)
1091
1099
  */
1092
- sql(query: DeeplyReadonly<Query | Query[]>, options?: LoadMethodOptions, callback?: LoadMethodCallback<SqlQuery>): void;
1100
+ sql(query: DeeplyReadonly<Query | Query[]>, options?: LoadMethodOptions, callback?: LoadMethodCallback<SqlQuery>): UnsubscribeObj;
1093
1101
 
1094
1102
  meta(options?: LoadMethodOptions): Promise<Meta>;
1095
1103
  /**
1096
1104
  * Get meta description of cubes available for querying.
1097
1105
  */
1098
- meta(options?: LoadMethodOptions, callback?: LoadMethodCallback<Meta>): void;
1106
+ meta(options?: LoadMethodOptions, callback?: LoadMethodCallback<Meta>): UnsubscribeObj;
1099
1107
 
1100
1108
  dryRun(query: DeeplyReadonly<Query | Query[]>, options?: LoadMethodOptions): Promise<DryRunResponse>;
1101
1109
  /**
1102
1110
  * Get query related meta without query execution
1103
1111
  */
1104
- dryRun(query: DeeplyReadonly<Query | Query[]>, options: LoadMethodOptions, callback?: LoadMethodCallback<DryRunResponse>): void;
1112
+ dryRun(query: DeeplyReadonly<Query | Query[]>, options: LoadMethodOptions, callback?: LoadMethodCallback<DryRunResponse>): UnsubscribeObj;
1105
1113
  }
1106
1114
 
1107
1115
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubejs-client/core",
3
- "version": "0.31.0",
3
+ "version": "0.31.9",
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": "8cdec759f298fb20c48194254ccc04b6fdad46bf"
48
+ "gitHead": "bf98f799b56361081acff0ba9cdca5fd3ea473c2"
49
49
  }
package/src/Meta.js CHANGED
@@ -14,6 +14,8 @@ const operators = {
14
14
  { name: 'notEquals', title: 'does not equal' },
15
15
  { name: 'set', title: 'is set' },
16
16
  { name: 'notSet', title: 'is not set' },
17
+ { name: 'startsWith', title: 'starts with' },
18
+ { name: 'endsWith', title: 'ends with' },
17
19
  ],
18
20
  number: [
19
21
  { name: 'equals', title: 'equals' },