@cubejs-backend/base-driver 0.31.32 → 0.31.38

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.
@@ -0,0 +1,14 @@
1
+ import { CancelablePromise, MaybeCancelablePromise } from '@cubejs-backend/shared';
2
+ export interface CacheDriverInterface {
3
+ get(key: string): Promise<any>;
4
+ set(key: string, value: any, expiration: any): Promise<{
5
+ key: string;
6
+ bytes: number;
7
+ }>;
8
+ remove(key: string): Promise<void>;
9
+ keysStartingWith(prefix: string): Promise<any[]>;
10
+ cleanup(): Promise<void>;
11
+ testConnection(): Promise<void>;
12
+ withLock(key: string, cb: () => MaybeCancelablePromise<any>, expiration: number, freeAfter: boolean): CancelablePromise<boolean>;
13
+ }
14
+ //# sourceMappingURL=cache-driver.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-driver.interface.d.ts","sourceRoot":"","sources":["../../src/cache-driver.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,KAAA,EAAE,UAAU,KAAA,GAAG,OAAO,CAAC;QAC3C,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACjD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,QAAQ,CACN,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,sBAAsB,CAAC,GAAG,CAAC,EACrC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,GACjB,iBAAiB,CAAC,OAAO,CAAC,CAAC;CAC/B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=cache-driver.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-driver.interface.js","sourceRoot":"","sources":["../../src/cache-driver.interface.ts"],"names":[],"mappings":""}
@@ -1,4 +1,6 @@
1
1
  export * from './BaseDriver';
2
2
  export * from './utils';
3
3
  export * from './driver.interface';
4
+ export * from './queue-driver.interface';
5
+ export * from './cache-driver.interface';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
package/dist/src/index.js CHANGED
@@ -13,4 +13,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./BaseDriver"), exports);
14
14
  __exportStar(require("./utils"), exports);
15
15
  __exportStar(require("./driver.interface"), exports);
16
+ __exportStar(require("./queue-driver.interface"), exports);
17
+ __exportStar(require("./cache-driver.interface"), exports);
16
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6B;AAC7B,0CAAwB;AACxB,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6B;AAC7B,0CAAwB;AACxB,qDAAmC;AACnC,2DAAyC;AACzC,2DAAyC"}
@@ -0,0 +1,23 @@
1
+ export interface QueueDriverConnectionInterface {
2
+ getResultBlocking(queryKey: string): Promise<unknown>;
3
+ getResult(queryKey: string): Promise<unknown>;
4
+ addToQueue(queryKey: string): Promise<unknown>;
5
+ getToProcessQueries(): Promise<unknown>;
6
+ getActiveQueries(): Promise<unknown>;
7
+ getOrphanedQueries(): Promise<unknown>;
8
+ getStalledQueries(): Promise<unknown>;
9
+ getQueryStageState(onlyKeys: any): Promise<unknown>;
10
+ updateHeartBeat(queryKey: string): Promise<void>;
11
+ getNextProcessingId(): Promise<string>;
12
+ retrieveForProcessing(queryKey: string, processingId: string): Promise<unknown>;
13
+ freeProcessingLock(queryKe: string, processingId: string, activated: unknown): Promise<unknown>;
14
+ optimisticQueryUpdate(queryKey: any, toUpdate: any, processingId: any): Promise<unknown>;
15
+ cancelQuery(queryKey: string): Promise<unknown>;
16
+ setResultAndRemoveQuery(queryKey: string, executionResult: any, processingId: any): Promise<unknown>;
17
+ release(): Promise<void>;
18
+ }
19
+ export interface QueueDriverInterface {
20
+ createConnection(): Promise<QueueDriverConnectionInterface>;
21
+ release(connection: QueueDriverConnectionInterface): Promise<void>;
22
+ }
23
+ //# sourceMappingURL=queue-driver.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue-driver.interface.d.ts","sourceRoot":"","sources":["../../src/queue-driver.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC7C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtD,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG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__esModule", { value: true });
3
+ //# sourceMappingURL=queue-driver.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue-driver.interface.js","sourceRoot":"","sources":["../../src/queue-driver.interface.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@cubejs-backend/base-driver",
3
3
  "description": "Cube.js Base Driver",
4
4
  "author": "Cube Dev, Inc.",
5
- "version": "0.31.32",
5
+ "version": "0.31.38",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/cube-js/cube.js.git",
@@ -29,7 +29,7 @@
29
29
  "dist/src/*"
30
30
  ],
31
31
  "dependencies": {
32
- "@cubejs-backend/shared": "^0.31.32",
32
+ "@cubejs-backend/shared": "^0.31.38",
33
33
  "ramda": "^0.27.0"
34
34
  },
35
35
  "devDependencies": {
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "03ead10d0fd5f3fae5a7356450be489a2f05ae47"
65
+ "gitHead": "30548db96aeca9e4161b936e248964c2ec7b768a"
66
66
  }