@atscript/db-memory 0.1.134 → 0.1.135
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/index.cjs +2 -4
- package/dist/index.mjs +3 -5
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -470,6 +470,7 @@ function numericValue(value) {
|
|
|
470
470
|
* there are no rows.
|
|
471
471
|
*/
|
|
472
472
|
function accumulatorFactory(expr) {
|
|
473
|
+
(0, _atscript_db_agg.assertAggregateFn)(expr.$fn);
|
|
473
474
|
const field = expr.$field;
|
|
474
475
|
const read = pathReader(field);
|
|
475
476
|
switch (expr.$fn) {
|
|
@@ -518,10 +519,7 @@ function accumulatorFactory(expr) {
|
|
|
518
519
|
};
|
|
519
520
|
};
|
|
520
521
|
}
|
|
521
|
-
default:
|
|
522
|
-
path: "$select",
|
|
523
|
-
message: `Unsupported aggregate function "${String(expr.$fn)}" — use count, sum, avg, min or max`
|
|
524
|
-
}]);
|
|
522
|
+
default: return expr.$fn;
|
|
525
523
|
}
|
|
526
524
|
}
|
|
527
525
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ALL_BUCKET_UNITS, BaseDbAdapter, DbError, DbSpace, walkFilter } from "@atscript/db";
|
|
2
|
-
import { resolveAlias } from "@atscript/db/agg";
|
|
2
|
+
import { assertAggregateFn, resolveAlias } from "@atscript/db/agg";
|
|
3
3
|
import { bucketer } from "@uniqu/core";
|
|
4
4
|
//#region src/lib/memory-filter.ts
|
|
5
5
|
/**
|
|
@@ -469,6 +469,7 @@ function numericValue(value) {
|
|
|
469
469
|
* there are no rows.
|
|
470
470
|
*/
|
|
471
471
|
function accumulatorFactory(expr) {
|
|
472
|
+
assertAggregateFn(expr.$fn);
|
|
472
473
|
const field = expr.$field;
|
|
473
474
|
const read = pathReader(field);
|
|
474
475
|
switch (expr.$fn) {
|
|
@@ -517,10 +518,7 @@ function accumulatorFactory(expr) {
|
|
|
517
518
|
};
|
|
518
519
|
};
|
|
519
520
|
}
|
|
520
|
-
default:
|
|
521
|
-
path: "$select",
|
|
522
|
-
message: `Unsupported aggregate function "${String(expr.$fn)}" — use count, sum, avg, min or max`
|
|
523
|
-
}]);
|
|
521
|
+
default: return expr.$fn;
|
|
524
522
|
}
|
|
525
523
|
}
|
|
526
524
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db-memory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.135",
|
|
4
4
|
"description": "In-memory adapter for atscript-db.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@atscript/core": "^0.1.92",
|
|
40
40
|
"@atscript/typescript": "^0.1.92",
|
|
41
|
-
"@uniqu/core": "^0.1.
|
|
41
|
+
"@uniqu/core": "^0.1.11",
|
|
42
42
|
"unplugin-atscript": "^0.1.92"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@atscript/core": "^0.1.92",
|
|
46
46
|
"@atscript/typescript": "^0.1.92",
|
|
47
|
-
"@uniqu/core": "^0.1.
|
|
48
|
-
"@atscript/db": "^0.1.
|
|
47
|
+
"@uniqu/core": "^0.1.11",
|
|
48
|
+
"@atscript/db": "^0.1.135"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"postinstall": "asc -f dts",
|