Skip to content

Commit 485dc33

Browse files
committed
imject CacheMode into more places
1 parent 1683031 commit 485dc33

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

packages/cubejs-api-gateway/src/types/query.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
QueryTimeDimensionGranularity,
1313
} from './strings';
1414
import { ResultType } from './enums';
15+
import { CacheMode } from '@cubejs-backend/native';
1516

1617
/**
1718
* Query base filter definition.
@@ -139,7 +140,9 @@ interface Query {
139140
totalQuery?: boolean;
140141
order?: any;
141142
timezone?: string;
143+
// @deprecated
142144
renewQuery?: boolean;
145+
cache?: CacheMode;
143146
ungrouped?: boolean;
144147
responseFormat?: ResultType;
145148

packages/cubejs-client-core/src/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Meta from './Meta';
22
import { TimeDimensionGranularity } from './time';
33
import { TransportOptions } from './HttpTransport';
4+
import { CacheMode } from '@cubejs-backend/native';
45

56
export type QueryOrder = 'asc' | 'desc' | 'none';
67

@@ -113,7 +114,9 @@ export interface Query {
113114
offset?: number;
114115
order?: TQueryOrderObject | TQueryOrderArray;
115116
timezone?: string;
117+
// @deprecated
116118
renewQuery?: boolean;
119+
cache?: CacheMode;
117120
ungrouped?: boolean;
118121
responseFormat?: 'compact' | 'default';
119122
total?: boolean;

packages/cubejs-client-dx/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { CacheMode } from '@cubejs-backend/native';
2+
13
declare module "@cubejs-client/core" {
24

35
export type IntrospectedMeasureName = import('./generated').IntrospectedMeasureName;
@@ -19,7 +21,9 @@ declare module "@cubejs-client/core" {
1921
offset?: number;
2022
order?: IntrospectedTQueryOrderObject | IntrospectedTQueryOrderArray;
2123
timezone?: string;
24+
// @deprecated
2225
renewQuery?: boolean;
26+
cache?: CacheMode;
2327
ungrouped?: boolean;
2428
}
2529

packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { DriverFactory, DriverFactoryByDataSource } from './DriverFactory';
1919
import { LoadPreAggregationResult, PreAggregationDescription } from './PreAggregations';
2020
import { getCacheHash } from './utils';
2121
import { CacheAndQueryDriverType, MetadataOperationType } from './QueryOrchestrator';
22+
import { CacheMode } from '@cubejs-backend/native';
2223

2324
type QueryOptions = {
2425
external?: boolean;
@@ -46,7 +47,9 @@ export type Query = {
4647
preAggregations?: PreAggregationDescription[];
4748
groupedPartitionPreAggregations?: PreAggregationDescription[][];
4849
preAggregationsLoadCacheByDataSource?: any;
50+
// @deprecated
4951
renewQuery?: boolean;
52+
cache?: CacheMode;
5053
compilerCacheFn?: <T>(subKey: string[], cacheFn: () => T) => T;
5154
};
5255

@@ -56,7 +59,9 @@ export type QueryBody = {
5659
query?: string;
5760
values?: string[];
5861
continueWait?: boolean;
62+
// @deprecated
5963
renewQuery?: boolean;
64+
cache?: CacheMode;
6065
requestId?: string;
6166
external?: boolean;
6267
isJob?: boolean;

0 commit comments

Comments
 (0)