electrodb 3.7.1 → 3.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/index.d.ts +29 -10
- package/package.json +1 -1
- package/src/entity.js +3 -1
package/index.d.ts
CHANGED
|
@@ -2396,14 +2396,33 @@ interface QueryOperations<
|
|
|
2396
2396
|
) => QueryBranches<A, F, C, S, ResponseItem, IndexCompositeAttributes, I>;
|
|
2397
2397
|
go: GoQueryTerminal<A, F, C, S, ResponseItem, I>;
|
|
2398
2398
|
params: ParamTerminal<A, F, C, S, ResponseItem>;
|
|
2399
|
-
where:
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2399
|
+
where: IndexSpecificSchema<A, F, C, S, I> extends Schema<
|
|
2400
|
+
infer A2,
|
|
2401
|
+
infer F2,
|
|
2402
|
+
infer C2
|
|
2403
|
+
>
|
|
2404
|
+
? WhereClause<
|
|
2405
|
+
A2,
|
|
2406
|
+
F2,
|
|
2407
|
+
C2,
|
|
2408
|
+
IndexSpecificSchema<A, F, C, S, I>,
|
|
2409
|
+
Item<
|
|
2410
|
+
A2,
|
|
2411
|
+
F2,
|
|
2412
|
+
C2,
|
|
2413
|
+
IndexSpecificSchema<A, F, C, S, I>,
|
|
2414
|
+
IndexSpecificSchema<A, F, C, S, I>["attributes"]
|
|
2415
|
+
>,
|
|
2416
|
+
QueryBranches<A, F, C, S, ResponseItem, IndexCompositeAttributes, I>
|
|
2417
|
+
>
|
|
2418
|
+
: WhereClause<
|
|
2419
|
+
A,
|
|
2420
|
+
F,
|
|
2421
|
+
C,
|
|
2422
|
+
S,
|
|
2423
|
+
Item<A, F, C, S, S["attributes"]>,
|
|
2424
|
+
QueryBranches<A, F, C, S, ResponseItem, IndexCompositeAttributes, I>
|
|
2425
|
+
>;
|
|
2407
2426
|
}
|
|
2408
2427
|
|
|
2409
2428
|
type IndexKeyComposite<
|
|
@@ -5302,8 +5321,8 @@ export type WhereCallback<
|
|
|
5302
5321
|
C extends string,
|
|
5303
5322
|
S extends Schema<A, F, C>,
|
|
5304
5323
|
I extends Item<A, F, C, S, S["attributes"]>,
|
|
5305
|
-
> =
|
|
5306
|
-
attributes:
|
|
5324
|
+
> = (
|
|
5325
|
+
attributes: WhereAttributes<A, F, C, S, I>,
|
|
5307
5326
|
operations: WhereOperations<A, F, C, S, I>,
|
|
5308
5327
|
) => string;
|
|
5309
5328
|
|
package/package.json
CHANGED
package/src/entity.js
CHANGED
|
@@ -921,6 +921,8 @@ class Entity {
|
|
|
921
921
|
is(item, config) {
|
|
922
922
|
return (
|
|
923
923
|
config.ignoreOwnership &&
|
|
924
|
+
config.attributes &&
|
|
925
|
+
config.attributes.length > 0 &&
|
|
924
926
|
!this._itemIncludesKeys(item)
|
|
925
927
|
) || (
|
|
926
928
|
(config.ignoreOwnership || config.hydrate) &&
|
|
@@ -1019,8 +1021,8 @@ class Entity {
|
|
|
1019
1021
|
return null;
|
|
1020
1022
|
}
|
|
1021
1023
|
const config = {
|
|
1022
|
-
...(options || {}),
|
|
1023
1024
|
ignoreOwnership: true,
|
|
1025
|
+
...(options || {}),
|
|
1024
1026
|
};
|
|
1025
1027
|
return this.formatResponse(item, TableIndex, config);
|
|
1026
1028
|
}
|