electrodb 3.5.0 → 3.5.2
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 +8 -0
- package/package.json +1 -1
- package/src/entity.js +7 -3
package/index.d.ts
CHANGED
|
@@ -2595,7 +2595,11 @@ export type ParamOptions = {
|
|
|
2595
2595
|
|
|
2596
2596
|
export interface BulkOptions extends QueryOptions {
|
|
2597
2597
|
unprocessed?: "raw" | "item";
|
|
2598
|
+
/**
|
|
2599
|
+
* @deprecated use "concurrent" instead
|
|
2600
|
+
*/
|
|
2598
2601
|
concurrency?: number;
|
|
2602
|
+
concurrent?: number;
|
|
2599
2603
|
preserveBatchOrder?: boolean;
|
|
2600
2604
|
}
|
|
2601
2605
|
|
|
@@ -2614,7 +2618,11 @@ interface GoBatchGetTerminalOptions<Attributes> {
|
|
|
2614
2618
|
pages?: number;
|
|
2615
2619
|
attributes?: ReadonlyArray<Attributes>;
|
|
2616
2620
|
unprocessed?: "raw" | "item";
|
|
2621
|
+
/**
|
|
2622
|
+
* @deprecated use "concurrent" instead
|
|
2623
|
+
*/
|
|
2617
2624
|
concurrency?: number;
|
|
2625
|
+
concurrent?: number;
|
|
2618
2626
|
preserveBatchOrder?: boolean;
|
|
2619
2627
|
listeners?: Array<ElectroEventListener>;
|
|
2620
2628
|
logger?: ElectroEventListener;
|
package/package.json
CHANGED
package/src/entity.js
CHANGED
|
@@ -1404,7 +1404,7 @@ class Entity {
|
|
|
1404
1404
|
if (isNaN(value) || value < 1) {
|
|
1405
1405
|
throw new e.ElectroError(
|
|
1406
1406
|
e.ErrorCodes.InvalidConcurrencyOption,
|
|
1407
|
-
"Query option '
|
|
1407
|
+
"Query option 'concurrent' must be of type 'number' and greater than zero.",
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
1410
|
return value;
|
|
@@ -2139,7 +2139,10 @@ class Entity {
|
|
|
2139
2139
|
|
|
2140
2140
|
_batchGetParams(state, config = {}) {
|
|
2141
2141
|
let table = config.table || this.getTableName();
|
|
2142
|
-
let userDefinedParams =
|
|
2142
|
+
let userDefinedParams = this._applyProjectionExpressions({
|
|
2143
|
+
parameters: config.params || {},
|
|
2144
|
+
config,
|
|
2145
|
+
});
|
|
2143
2146
|
|
|
2144
2147
|
// TableName is added when the config provided includes "table"
|
|
2145
2148
|
// this is evaluated upstream so we remove it to avoid forming
|
|
@@ -3785,8 +3788,9 @@ class Entity {
|
|
|
3785
3788
|
this.model.facets.labels[index] &&
|
|
3786
3789
|
Array.isArray(this.model.facets.labels[index].sk);
|
|
3787
3790
|
let labels = hasLabels ? this.model.facets.labels[index].sk : [];
|
|
3791
|
+
const hasFacets = Object.keys(skFacet).length > 0;
|
|
3788
3792
|
let sortKey = this._makeKey(prefixes.sk, facets.sk, skFacet, labels, {
|
|
3789
|
-
excludeLabelTail:
|
|
3793
|
+
excludeLabelTail: hasFacets,
|
|
3790
3794
|
excludePostfix,
|
|
3791
3795
|
transform,
|
|
3792
3796
|
});
|