@cubejs-backend/questdb-driver 1.7.2 → 1.7.3
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/dist/src/QuestQuery.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export declare class QuestQuery extends BaseQuery {
|
|
|
10
10
|
addInterval(date: string, interval: string): string;
|
|
11
11
|
unixTimestampSql(): string;
|
|
12
12
|
timeGroupedColumn(granularity: string, dimension: string): string;
|
|
13
|
+
dateBin(interval: string, source: string, origin: string): string;
|
|
14
|
+
private dateBinOriginShift;
|
|
15
|
+
private questFloorStride;
|
|
13
16
|
dimensionsJoinCondition(leftAlias: string, rightAlias: string): string;
|
|
14
17
|
baseHaving(query: string, filters: BaseFilter[]): string;
|
|
15
18
|
renderSqlMeasure(name: string, evaluateSql: string, symbol: any, cubeName: string, parentMeasure: string, orderBySql: string[]): string;
|
|
@@ -19,5 +22,8 @@ export declare class QuestQuery extends BaseQuery {
|
|
|
19
22
|
desc: boolean;
|
|
20
23
|
}): string | null;
|
|
21
24
|
groupByClause(): string;
|
|
25
|
+
countDistinctApprox(sql: string): string;
|
|
26
|
+
limitOffsetClause(limit: string | number | null, offset: string | number | null): string;
|
|
27
|
+
sqlTemplates(): any;
|
|
22
28
|
}
|
|
23
29
|
//# sourceMappingURL=QuestQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestQuery.d.ts","sourceRoot":"","sources":["../../src/QuestQuery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QuestQuery.d.ts","sourceRoot":"","sources":["../../src/QuestQuery.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,SAAS,EACT,cAAc,EACf,MAAM,iCAAiC,CAAC;AA8DzC,qBAAa,UAAW,SAAQ,SAAS;IAChC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,UAAU;IAIlC,iBAAiB,IAAI,cAAc;IAInC,gBAAgB,CA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IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM;IAkBxF,YAAY;CA0CpB"}
|
package/dist/src/QuestQuery.js
CHANGED
|
@@ -1,19 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.QuestQuery = void 0;
|
|
7
30
|
const ramda_1 = __importDefault(require("ramda"));
|
|
31
|
+
const moment = __importStar(require("moment"));
|
|
8
32
|
const schema_compiler_1 = require("@cubejs-backend/schema-compiler");
|
|
9
33
|
const GRANULARITY_TO_INTERVAL = {
|
|
10
34
|
second: 's',
|
|
11
35
|
minute: 'm',
|
|
12
36
|
hour: 'h',
|
|
13
37
|
day: 'd',
|
|
38
|
+
week: 'w',
|
|
14
39
|
month: 'M',
|
|
15
40
|
year: 'y'
|
|
16
41
|
};
|
|
42
|
+
const QUEST_UNIT_TO_MOMENT = {
|
|
43
|
+
s: 'seconds',
|
|
44
|
+
m: 'minutes',
|
|
45
|
+
h: 'hours',
|
|
46
|
+
d: 'days',
|
|
47
|
+
w: 'weeks',
|
|
48
|
+
M: 'months',
|
|
49
|
+
y: 'years',
|
|
50
|
+
};
|
|
51
|
+
// A fixed instant that precedes any realistic analytics data. A custom
|
|
52
|
+
// granularity's origin is shifted back to just before this anchor so QuestDB's
|
|
53
|
+
// timestamp_floor() always buckets forward from an origin at/under the data.
|
|
54
|
+
const DATE_BIN_ORIGIN_ANCHOR = '1000-01-01T00:00:00.000Z';
|
|
55
|
+
const INT32_MAX = 2147483647;
|
|
56
|
+
// QuestDB dateadd/datediff take a single-character period unit (e.g. 'd', 'M'),
|
|
57
|
+
// not the full word Cube's parseInterval yields ('day', 'month', …).
|
|
58
|
+
const INTERVAL_TO_QUEST_DATE_UNIT = {
|
|
59
|
+
second: { unit: 's', factor: 1 },
|
|
60
|
+
minute: { unit: 'm', factor: 1 },
|
|
61
|
+
hour: { unit: 'h', factor: 1 },
|
|
62
|
+
day: { unit: 'd', factor: 1 },
|
|
63
|
+
week: { unit: 'w', factor: 1 },
|
|
64
|
+
month: { unit: 'M', factor: 1 },
|
|
65
|
+
// no quarter unit, 3 months
|
|
66
|
+
quarter: { unit: 'M', factor: 3 },
|
|
67
|
+
year: { unit: 'y', factor: 1 },
|
|
68
|
+
};
|
|
17
69
|
class QuestParamAllocator extends schema_compiler_1.ParamAllocator {
|
|
18
70
|
paramPlaceHolder(paramIndex) {
|
|
19
71
|
return `$${paramIndex + 1}`;
|
|
@@ -51,11 +103,13 @@ class QuestQuery extends schema_compiler_1.BaseQuery {
|
|
|
51
103
|
}
|
|
52
104
|
subtractInterval(date, interval) {
|
|
53
105
|
const [number, type] = this.parseInterval(interval);
|
|
54
|
-
|
|
106
|
+
const { unit, factor } = INTERVAL_TO_QUEST_DATE_UNIT[type];
|
|
107
|
+
return `dateadd('${unit}', ${-number * factor}, ${date})`;
|
|
55
108
|
}
|
|
56
109
|
addInterval(date, interval) {
|
|
57
110
|
const [number, type] = this.parseInterval(interval);
|
|
58
|
-
|
|
111
|
+
const { unit, factor } = INTERVAL_TO_QUEST_DATE_UNIT[type];
|
|
112
|
+
return `dateadd('${unit}', ${number * factor}, ${date})`;
|
|
59
113
|
}
|
|
60
114
|
unixTimestampSql() {
|
|
61
115
|
// QuestDB's now() function returns epoch timestamp with microsecond granularity.
|
|
@@ -68,6 +122,38 @@ class QuestQuery extends schema_compiler_1.BaseQuery {
|
|
|
68
122
|
}
|
|
69
123
|
return `timestamp_floor('${GRANULARITY_TO_INTERVAL[granularity]}', ${dimension})`;
|
|
70
124
|
}
|
|
125
|
+
dateBin(interval, source, origin) {
|
|
126
|
+
const { stride, unit, count } = this.questFloorStride(interval);
|
|
127
|
+
// timestamp_floor(stride, ts, origin) only buckets forward from `origin`, so
|
|
128
|
+
// an origin later than the data collapses every row into a single bucket.
|
|
129
|
+
// Shift `origin` back by a whole number of strides (which preserves the bin
|
|
130
|
+
// phase, as flooring is periodic modulo the stride) to just before a fixed
|
|
131
|
+
// anchor that precedes any realistic data.
|
|
132
|
+
const shift = this.dateBinOriginShift(origin, unit, count);
|
|
133
|
+
const shiftedOrigin = shift > 0
|
|
134
|
+
? `dateadd('${unit}', ${-shift}, cast('${origin}' as timestamp))`
|
|
135
|
+
: `cast('${origin}' as timestamp)`;
|
|
136
|
+
return `timestamp_floor('${stride}', ${source}, ${shiftedOrigin})`;
|
|
137
|
+
}
|
|
138
|
+
dateBinOriginShift(origin, unit, count) {
|
|
139
|
+
const parsedOrigin = moment.utc(origin);
|
|
140
|
+
if (!parsedOrigin.isValid()) {
|
|
141
|
+
throw new Error(`QuestDB custom granularity has an unparseable origin: ${origin}`);
|
|
142
|
+
}
|
|
143
|
+
const anchor = moment.utc(DATE_BIN_ORIGIN_ANCHOR);
|
|
144
|
+
const strides = Math.ceil(parsedOrigin.diff(anchor, QUEST_UNIT_TO_MOMENT[unit]) / count);
|
|
145
|
+
const shift = strides > 0 ? strides * count : 0;
|
|
146
|
+
if (shift > INT32_MAX) {
|
|
147
|
+
throw new Error(`QuestDB cannot anchor custom granularity '${count} ${unit}': origin shift ${shift} exceeds dateadd()'s 32-bit range`);
|
|
148
|
+
}
|
|
149
|
+
return shift;
|
|
150
|
+
}
|
|
151
|
+
questFloorStride(interval) {
|
|
152
|
+
const [duration, type] = this.parseInterval(interval);
|
|
153
|
+
const { unit, factor } = INTERVAL_TO_QUEST_DATE_UNIT[type];
|
|
154
|
+
const count = duration * factor;
|
|
155
|
+
return { stride: `${count}${unit}`, unit, count };
|
|
156
|
+
}
|
|
71
157
|
dimensionsJoinCondition(leftAlias, rightAlias) {
|
|
72
158
|
const dimensionAliases = this.dimensionAliasNames();
|
|
73
159
|
if (!dimensionAliases.length) {
|
|
@@ -140,6 +226,63 @@ class QuestQuery extends schema_compiler_1.BaseQuery {
|
|
|
140
226
|
const names = this.dimensionAliasNames();
|
|
141
227
|
return names.length ? ` GROUP BY ${names.join(', ')}` : '';
|
|
142
228
|
}
|
|
229
|
+
countDistinctApprox(sql) {
|
|
230
|
+
return `approx_count_distinct(${sql})`;
|
|
231
|
+
}
|
|
232
|
+
// QuestDB has no standalone OFFSET keyword; it uses `LIMIT lo, hi` (skip `lo`
|
|
233
|
+
// rows, return up to position `hi`).
|
|
234
|
+
limitOffsetClause(limit, offset) {
|
|
235
|
+
const o = offset != null ? parseInt(`${offset}`, 10) : null;
|
|
236
|
+
const l = limit != null ? parseInt(`${limit}`, 10) : null;
|
|
237
|
+
if (o != null && l != null) {
|
|
238
|
+
return ` LIMIT ${o}, ${o + l}`;
|
|
239
|
+
}
|
|
240
|
+
if (o != null) {
|
|
241
|
+
return ` LIMIT ${o}, 2147483647`;
|
|
242
|
+
}
|
|
243
|
+
if (l != null) {
|
|
244
|
+
return ` LIMIT ${l}`;
|
|
245
|
+
}
|
|
246
|
+
return '';
|
|
247
|
+
}
|
|
248
|
+
sqlTemplates() {
|
|
249
|
+
const templates = super.sqlTemplates();
|
|
250
|
+
// eslint-disable-next-line no-template-curly-in-string
|
|
251
|
+
templates.params.param = '${{ param_index + 1 }}';
|
|
252
|
+
// QuestDB does not support the `NULLS FIRST/LAST` ordering keywords.
|
|
253
|
+
templates.expressions.sort = '{{ expr }} {% if asc %}ASC{% else %}DESC{% endif %}';
|
|
254
|
+
templates.expressions.order_by = '{% if index %}{{ index }}{% else %}{{ expr }}{% endif %} {% if asc %}ASC{% else %}DESC{% endif %}';
|
|
255
|
+
templates.statements.time_series_select = 'SELECT cast(dates.f as timestamp) date_from, cast(dates.t as timestamp) date_to \n' +
|
|
256
|
+
'FROM (\n' +
|
|
257
|
+
'{% for time_item in seria %}' +
|
|
258
|
+
' select \'{{ time_item[0] }}\' f, \'{{ time_item[1] }}\' t \n' +
|
|
259
|
+
'{% if not loop.last %} UNION ALL\n{% endif %}' +
|
|
260
|
+
'{% endfor %}' +
|
|
261
|
+
') AS dates';
|
|
262
|
+
// QuestDB uses `LIMIT lo, hi` instead of `LIMIT n OFFSET m` (there is no
|
|
263
|
+
// standalone OFFSET keyword). The only change from the base SELECT template
|
|
264
|
+
// is the limit/offset tail: hi = offset + limit, or a large sentinel when
|
|
265
|
+
// only an offset is given.
|
|
266
|
+
templates.statements.select = '{% if ctes %} WITH {% if recursive %}RECURSIVE {% endif %}\n' +
|
|
267
|
+
'{{ ctes | join(\',\n\') }}\n' +
|
|
268
|
+
'{% endif %}' +
|
|
269
|
+
'SELECT {% if distinct %}DISTINCT {% endif %}' +
|
|
270
|
+
'{{ select_concat | map(attribute=\'aliased\') | join(\', \') }} {% if from %}\n' +
|
|
271
|
+
'FROM (\n' +
|
|
272
|
+
'{{ from | indent(2, true) }}\n' +
|
|
273
|
+
') AS {{ from_alias }}{% elif from_prepared %}\n' +
|
|
274
|
+
'FROM {{ from_prepared }}' +
|
|
275
|
+
'{% endif %}' +
|
|
276
|
+
'{% for join in joins %}\n{{ join }}{% endfor %}' +
|
|
277
|
+
'{% if filter %}\nWHERE {{ filter }}{% endif %}' +
|
|
278
|
+
'{% if group_by %}\nGROUP BY {{ group_by }}{% endif %}' +
|
|
279
|
+
'{% if having %}\nHAVING {{ having }}{% endif %}' +
|
|
280
|
+
'{% if order_by %}\nORDER BY {{ order_by | map(attribute=\'expr\') | join(\', \') }}{% endif %}' +
|
|
281
|
+
'{% if offset is not none and limit is not none %}\nLIMIT {{ offset }}, {{ (offset | int) + (limit | int) }}' +
|
|
282
|
+
'{% elif offset is not none %}\nLIMIT {{ offset }}, 2147483647' +
|
|
283
|
+
'{% elif limit is not none %}\nLIMIT {{ limit }}{% endif %}';
|
|
284
|
+
return templates;
|
|
285
|
+
}
|
|
143
286
|
}
|
|
144
287
|
exports.QuestQuery = QuestQuery;
|
|
145
288
|
//# sourceMappingURL=QuestQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestQuery.js","sourceRoot":"","sources":["../../src/QuestQuery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QuestQuery.js","sourceRoot":"","sources":["../../src/QuestQuery.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAsB;AACtB,+CAAiC;AACjC,qEAIyC;AAEzC,MAAM,uBAAuB,GAA2B;IACtD,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;CACV,CAAC;AAEF,MAAM,oBAAoB,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B,SAAS,CAAC,UAAU,CAAC,MAAM,GAAG,8DAA8D;YAC1F,8BAA8B;YAC9B,aAAa;YACb,8CAA8C;YAC9C,iFAAiF;YACjF,UAAU;YACV,gCAAgC;YAChC,iDAAiD;YACjD,0BAA0B;YAC1B,aAAa;YACb,iDAAiD;YACjD,gDAAgD;YAChD,uDAAuD;YACvD,iDAAiD;YACjD,gGAAgG;YAChG,6GAA6G;YAC7G,+DAA+D;YAC/D,4DAA4D,CAAC;QAE/D,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArPD,gCAqPC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@cubejs-backend/questdb-driver",
|
|
3
3
|
"description": "Cube.js QuestDB database driver",
|
|
4
4
|
"author": "Cube Dev, Inc.",
|
|
5
|
-
"version": "1.7.
|
|
5
|
+
"version": "1.7.3",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/cube-js/cube.git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"lint:fix": "eslint --fix src/* --ext .ts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cubejs-backend/base-driver": "1.7.
|
|
31
|
-
"@cubejs-backend/schema-compiler": "1.7.
|
|
32
|
-
"@cubejs-backend/shared": "1.7.
|
|
30
|
+
"@cubejs-backend/base-driver": "1.7.3",
|
|
31
|
+
"@cubejs-backend/schema-compiler": "1.7.3",
|
|
32
|
+
"@cubejs-backend/shared": "1.7.3",
|
|
33
33
|
"@types/pg": "^8.6.0",
|
|
34
34
|
"moment": "^2.24.0",
|
|
35
35
|
"pg": "^8.7.0",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"license": "Apache-2.0",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@cubejs-backend/linter": "1.7.
|
|
41
|
-
"@cubejs-backend/testing-shared": "1.7.
|
|
40
|
+
"@cubejs-backend/linter": "1.7.3",
|
|
41
|
+
"@cubejs-backend/testing-shared": "1.7.3",
|
|
42
42
|
"testcontainers": "^10.28.0",
|
|
43
43
|
"typescript": "~5.2.2"
|
|
44
44
|
},
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"eslintConfig": {
|
|
52
52
|
"extends": "../cubejs-linter"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "b8cfde8a2b0af0445fb8e3d9443ab1873b515e59"
|
|
55
55
|
}
|