dyna-record 0.6.0 → 0.6.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/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Dyna-Record
|
|
2
2
|
|
|
3
|
-
[API Documentation](https://dyna-record.com/)
|
|
3
|
+
[API Documentation](https://docs.dyna-record.com/)
|
|
4
4
|
|
|
5
5
|
[Medium Article](https://medium.com/@drewdavis888/unlock-relational-data-modeling-in-dynamodb-with-dyna-record-5b9cce27c3ce)
|
|
6
6
|
|
|
@@ -51,9 +51,9 @@ Entities in Dyna-Record represent your DynamoDB table structure and relationship
|
|
|
51
51
|
|
|
52
52
|
### Table
|
|
53
53
|
|
|
54
|
-
[Docs](https://dyna-record.com/functions/Table.html)
|
|
54
|
+
[Docs](https://docs.dyna-record.com/functions/Table.html)
|
|
55
55
|
|
|
56
|
-
Create a table class that extends [DynaRecord base class](https://dyna-record.com/classes/default.html) and is decorated with the [Table decorator](https://dyna-record.com/functions/Table.html). At a minimum, the table class must define the [PartitionKeyAttribute](https://dyna-record.com/functions/PartitionKeyAttribute.html) and [SortKeyAttribute](https://dyna-record.com/functions/SortKeyAttribute.html).
|
|
56
|
+
Create a table class that extends [DynaRecord base class](https://docs.dyna-record.com/classes/default.html) and is decorated with the [Table decorator](https://docs.dyna-record.com/functions/Table.html). At a minimum, the table class must define the [PartitionKeyAttribute](https://docs.dyna-record.com/functions/PartitionKeyAttribute.html) and [SortKeyAttribute](https://docs.dyna-record.com/functions/SortKeyAttribute.html).
|
|
57
57
|
|
|
58
58
|
#### Basic usage
|
|
59
59
|
|
|
@@ -108,20 +108,20 @@ abstract class MyTable extends DynaRecord {
|
|
|
108
108
|
|
|
109
109
|
### Entity
|
|
110
110
|
|
|
111
|
-
[Docs](https://dyna-record.com/functions/Entity.html)
|
|
111
|
+
[Docs](https://docs.dyna-record.com/functions/Entity.html)
|
|
112
112
|
|
|
113
113
|
Each entity must extend the Table class. To support single table design patterns, they must extend the same tables class.
|
|
114
114
|
|
|
115
115
|
Each entity **must** declare its `type` property as a string literal matching the class name. This enables compile-time type safety for query filters and return types. Omitting this declaration will produce a compile error at the `@Entity` decorator.
|
|
116
116
|
|
|
117
|
-
By default, each entity will have [default attributes](https://dyna-record.com/types/_internal_.DefaultFields.html)
|
|
117
|
+
By default, each entity will have [default attributes](https://docs.dyna-record.com/types/_internal_.DefaultFields.html)
|
|
118
118
|
|
|
119
119
|
- The partition key defined on the [table](#table) class
|
|
120
120
|
- The sort key defined on the [table](#table) class
|
|
121
|
-
- [id](https://dyna-record.com/classes/default.html#id) - The id for the model. This will be an autogenerated uuid unless [IdAttribute](<(https://dyna-record.com/functions/IdAttribute.html)>) is set on a non-nullable entity attribute.
|
|
122
|
-
- [type](https://dyna-record.com/classes/default.html#type) - The type of the entity. Value is the entity class name. Must be declared as a string literal via `declare readonly type: "ClassName"`.
|
|
123
|
-
- [createdAt](https://dyna-record.com/classes/default.html#createdAt) - The timestamp of when the entity was created
|
|
124
|
-
- [updatedAt](https://dyna-record.com/classes/default.html#updatedAt) - Timestamp of when the entity was updated last
|
|
121
|
+
- [id](https://docs.dyna-record.com/classes/default.html#id) - The id for the model. This will be an autogenerated uuid unless [IdAttribute](<(https://docs.dyna-record.com/functions/IdAttribute.html)>) is set on a non-nullable entity attribute.
|
|
122
|
+
- [type](https://docs.dyna-record.com/classes/default.html#type) - The type of the entity. Value is the entity class name. Must be declared as a string literal via `declare readonly type: "ClassName"`.
|
|
123
|
+
- [createdAt](https://docs.dyna-record.com/classes/default.html#createdAt) - The timestamp of when the entity was created
|
|
124
|
+
- [updatedAt](https://docs.dyna-record.com/classes/default.html#updatedAt) - Timestamp of when the entity was updated last
|
|
125
125
|
|
|
126
126
|
```typescript
|
|
127
127
|
import { Entity } from "dyna-record";
|
|
@@ -147,17 +147,17 @@ Use the attribute decorators below to define attributes on a model. The decorato
|
|
|
147
147
|
|
|
148
148
|
- Attribute decorators
|
|
149
149
|
|
|
150
|
-
- [@StringAttribute](https://dyna-record.com/functions/StringAttribute.html)
|
|
151
|
-
- [@NumberAttribute](https://dyna-record.com/functions/NumberAttribute.html)
|
|
152
|
-
- [@BooleanAttribute](https://dyna-record.com/functions/BooleanAttribute.html)
|
|
153
|
-
- [@DateAttribute](https://dyna-record.com/functions/DateAttribute.html)
|
|
154
|
-
- [@EnumAttribute](https://dyna-record.com/functions/EnumAttribute.html)
|
|
155
|
-
- [@IdAttribute](https://dyna-record.com/functions/IdAttribute.html)
|
|
156
|
-
- [@ObjectAttribute](https://dyna-record.com/functions/ObjectAttribute.html)
|
|
150
|
+
- [@StringAttribute](https://docs.dyna-record.com/functions/StringAttribute.html)
|
|
151
|
+
- [@NumberAttribute](https://docs.dyna-record.com/functions/NumberAttribute.html)
|
|
152
|
+
- [@BooleanAttribute](https://docs.dyna-record.com/functions/BooleanAttribute.html)
|
|
153
|
+
- [@DateAttribute](https://docs.dyna-record.com/functions/DateAttribute.html)
|
|
154
|
+
- [@EnumAttribute](https://docs.dyna-record.com/functions/EnumAttribute.html)
|
|
155
|
+
- [@IdAttribute](https://docs.dyna-record.com/functions/IdAttribute.html)
|
|
156
|
+
- [@ObjectAttribute](https://docs.dyna-record.com/functions/ObjectAttribute.html)
|
|
157
157
|
|
|
158
|
-
- The [alias](https://dyna-record.com/interfaces/AttributeOptions.html#alias) option allows you to specify the attribute name as it appears in the DynamoDB table, different from your class property name.
|
|
158
|
+
- The [alias](https://docs.dyna-record.com/interfaces/AttributeOptions.html#alias) option allows you to specify the attribute name as it appears in the DynamoDB table, different from your class property name.
|
|
159
159
|
- Set nullable attributes as optional for optimal type safety
|
|
160
|
-
- Attempting to remove a non-nullable attribute will result in a [NullConstrainViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
|
|
160
|
+
- Attempting to remove a non-nullable attribute will result in a [NullConstrainViolationError](https://docs.dyna-record.com/classes/NullConstraintViolationError.html)
|
|
161
161
|
|
|
162
162
|
```typescript
|
|
163
163
|
import { Entity, Attribute } from "dyna-record";
|
|
@@ -251,11 +251,11 @@ The schema must be declared with `as const satisfies ObjectSchema` so TypeScript
|
|
|
251
251
|
|
|
252
252
|
### Foreign Keys
|
|
253
253
|
|
|
254
|
-
Define foreign keys in order to support [@BelongsTo](https://dyna-record.com/functions/BelongsTo.html) relationships. A foreign key is required for [@HasOne](https://dyna-record.com/functions/HasOne.html) and [@HasMany](https://dyna-record.com/functions/HasMany.html) relationships.
|
|
254
|
+
Define foreign keys in order to support [@BelongsTo](https://docs.dyna-record.com/functions/BelongsTo.html) relationships. A foreign key is required for [@HasOne](https://docs.dyna-record.com/functions/HasOne.html) and [@HasMany](https://docs.dyna-record.com/functions/HasMany.html) relationships.
|
|
255
255
|
|
|
256
|
-
- The [alias](https://dyna-record.com/interfaces/AttributeOptions.html#alias) option allows you to specify the attribute name as it appears in the DynamoDB table, different from your class property name.
|
|
256
|
+
- The [alias](https://docs.dyna-record.com/interfaces/AttributeOptions.html#alias) option allows you to specify the attribute name as it appears in the DynamoDB table, different from your class property name.
|
|
257
257
|
- Set nullable foreign key attributes as optional for optimal type safety
|
|
258
|
-
- Attempting to remove an entity from a non-nullable foreign key will result in a [NullConstrainViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
|
|
258
|
+
- Attempting to remove an entity from a non-nullable foreign key will result in a [NullConstrainViolationError](https://docs.dyna-record.com/classes/NullConstraintViolationError.html)
|
|
259
259
|
- Always provide the referenced entity class to `@ForeignKeyAttribute` (for example `@ForeignKeyAttribute(() => Customer)`); this allows DynaRecord to enforce referential integrity even when no relationship decorator is defined.
|
|
260
260
|
- `Create` and `Update` automatically add DynamoDB condition checks for standalone foreign keys (those without a relationship decorator) to ensure the referenced entity exists, enabling referential integrity even when no denormalised access pattern is required.
|
|
261
261
|
|
|
@@ -293,16 +293,16 @@ class Course extends MyTable {
|
|
|
293
293
|
|
|
294
294
|
### Relationships
|
|
295
295
|
|
|
296
|
-
Dyna-Record supports defining relationships between entities such as [@HasOne](https://dyna-record.com/functions/HasOne.html), [@HasMany](https://dyna-record.com/functions/HasMany.html), [@BelongsTo](https://dyna-record.com/functions/BelongsTo.html) and [@HasAndBelongsToMany](https://dyna-record.com/functions/HasAndBelongsToMany.html). It does this by de-normalizing records to each of its related entities partitions.
|
|
296
|
+
Dyna-Record supports defining relationships between entities such as [@HasOne](https://docs.dyna-record.com/functions/HasOne.html), [@HasMany](https://docs.dyna-record.com/functions/HasMany.html), [@BelongsTo](https://docs.dyna-record.com/functions/BelongsTo.html) and [@HasAndBelongsToMany](https://docs.dyna-record.com/functions/HasAndBelongsToMany.html). It does this by de-normalizing records to each of its related entities partitions.
|
|
297
297
|
|
|
298
|
-
A relationship can be defined as nullable or non-nullable. Non-nullable relationships will be enforced via transactions and violations will result in [NullConstraintViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
|
|
298
|
+
A relationship can be defined as nullable or non-nullable. Non-nullable relationships will be enforced via transactions and violations will result in [NullConstraintViolationError](https://docs.dyna-record.com/classes/NullConstraintViolationError.html)
|
|
299
299
|
|
|
300
|
-
- [@ForeignKeyAttribute](https://dyna-record.com/functions/ForeignKeyAttribute.html) is used to define a foreign key that links to another entity
|
|
301
|
-
- Relationship decorators ([@HasOne](#hasone), [@HasMany](#hasmany), [@BelongsTo](https://dyna-record.com/functions/BelongsTo.html), [@HasAndBelongsToMany](#hasandbelongstomany)) define how entities relate to each other.
|
|
300
|
+
- [@ForeignKeyAttribute](https://docs.dyna-record.com/functions/ForeignKeyAttribute.html) is used to define a foreign key that links to another entity
|
|
301
|
+
- Relationship decorators ([@HasOne](#hasone), [@HasMany](#hasmany), [@BelongsTo](https://docs.dyna-record.com/functions/BelongsTo.html), [@HasAndBelongsToMany](#hasandbelongstomany)) define how entities relate to each other.
|
|
302
302
|
|
|
303
303
|
#### HasOne
|
|
304
304
|
|
|
305
|
-
[Docs](https://dyna-record.com/functions/HasOne.html)
|
|
305
|
+
[Docs](https://docs.dyna-record.com/functions/HasOne.html)
|
|
306
306
|
|
|
307
307
|
```typescript
|
|
308
308
|
import {
|
|
@@ -337,7 +337,7 @@ class Grade extends MyTable {
|
|
|
337
337
|
|
|
338
338
|
### HasMany
|
|
339
339
|
|
|
340
|
-
[Docs](https://dyna-record.com/functions/HasMany.html)
|
|
340
|
+
[Docs](https://docs.dyna-record.com/functions/HasMany.html)
|
|
341
341
|
|
|
342
342
|
```typescript
|
|
343
343
|
import { Entity, NullableForeignKey, BelongsTo, HasMany } from "dyna-record";
|
|
@@ -391,9 +391,9 @@ class Course extends MyTable {
|
|
|
391
391
|
|
|
392
392
|
### HasAndBelongsToMany
|
|
393
393
|
|
|
394
|
-
[Docs](https://dyna-record.com/functions/HasAndBelongsToMany.html)
|
|
394
|
+
[Docs](https://docs.dyna-record.com/functions/HasAndBelongsToMany.html)
|
|
395
395
|
|
|
396
|
-
HasAndBelongsToMany relationships require a [JoinTable](https://dyna-record.com/classes/JoinTable.html) class. This represents a virtual table to support the relationship
|
|
396
|
+
HasAndBelongsToMany relationships require a [JoinTable](https://docs.dyna-record.com/classes/JoinTable.html) class. This represents a virtual table to support the relationship
|
|
397
397
|
|
|
398
398
|
```typescript
|
|
399
399
|
import {
|
|
@@ -435,9 +435,9 @@ class Student extends OtherTable {
|
|
|
435
435
|
|
|
436
436
|
### Create
|
|
437
437
|
|
|
438
|
-
[Docs](https://dyna-record.com/classes/default.html#create)
|
|
438
|
+
[Docs](https://docs.dyna-record.com/classes/default.html#create)
|
|
439
439
|
|
|
440
|
-
The create method is used to insert a new record into a DynamoDB table. This method automatically handles key generation (using UUIDs or custom id field if [IdAttribute](<(https://dyna-record.com/functions/IdAttribute.html)>) is set), timestamps for [createdAt](https://dyna-record.com/classes/default.html#createdAt) and [updatedAt](https://dyna-record.com/classes/default.html#updatedAt) fields, and the management of relationships between entities. It leverages AWS SDK's [TransactWriteCommand](https://www.google.com/search?q=aws+transact+write+command&oq=aws+transact+write+command&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg7MgYIAhBFGDvSAQgzMjAzajBqN6gCALACAA&sourceid=chrome&ie=UTF-8) for transactional integrity, ensuring either complete success or rollback in case of any failure. The method handles conditional checks to ensure data integrity and consistency during creation. If a foreignKey is set on create, dyna-record will de-normalize the data required in order to support the relationship
|
|
440
|
+
The create method is used to insert a new record into a DynamoDB table. This method automatically handles key generation (using UUIDs or custom id field if [IdAttribute](<(https://docs.dyna-record.com/functions/IdAttribute.html)>) is set), timestamps for [createdAt](https://docs.dyna-record.com/classes/default.html#createdAt) and [updatedAt](https://docs.dyna-record.com/classes/default.html#updatedAt) fields, and the management of relationships between entities. It leverages AWS SDK's [TransactWriteCommand](https://www.google.com/search?q=aws+transact+write+command&oq=aws+transact+write+command&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg7MgYIAhBFGDvSAQgzMjAzajBqN6gCALACAA&sourceid=chrome&ie=UTF-8) for transactional integrity, ensuring either complete success or rollback in case of any failure. The method handles conditional checks to ensure data integrity and consistency during creation. If a foreignKey is set on create, dyna-record will de-normalize the data required in order to support the relationship
|
|
441
441
|
|
|
442
442
|
To use the create method, call it on the model class you wish to create a new record for. Pass the properties of the new record as an object argument to the method. Only attributes defined on the model can be configured, and will be enforced via types and runtime schema validation.
|
|
443
443
|
|
|
@@ -482,20 +482,20 @@ const grade: Grade = await Grade.create(
|
|
|
482
482
|
|
|
483
483
|
#### Error handling
|
|
484
484
|
|
|
485
|
-
The method is designed to throw errors under various conditions, such as transaction cancellation due to failed conditional checks. For instance, if you attempt to create a `Grade` for an `Assignment` that already has one, the method throws a [TransactionWriteFailedError](https://dyna-record.com/classes/TransactionWriteFailedError.html).
|
|
485
|
+
The method is designed to throw errors under various conditions, such as transaction cancellation due to failed conditional checks. For instance, if you attempt to create a `Grade` for an `Assignment` that already has one, the method throws a [TransactionWriteFailedError](https://docs.dyna-record.com/classes/TransactionWriteFailedError.html).
|
|
486
486
|
|
|
487
487
|
#### Notes
|
|
488
488
|
|
|
489
|
-
- Automatic Timestamp Management: The [createdAt](https://dyna-record.com/classes/default.html#createdAt) and [updatedAt](https://dyna-record.com/classes/default.html#updatedAt) fields are managed automatically and reflect the time of creation and the last update, respectively.
|
|
490
|
-
- Automatic ID Generation: Each entity created gets a unique [id](https://dyna-record.com/classes/default.html#id) generated by the uuidv4 method.
|
|
491
|
-
- This can be customized [IdAttribute](<(https://dyna-record.com/functions/IdAttribute.html)>) to support custom id attributes
|
|
489
|
+
- Automatic Timestamp Management: The [createdAt](https://docs.dyna-record.com/classes/default.html#createdAt) and [updatedAt](https://docs.dyna-record.com/classes/default.html#updatedAt) fields are managed automatically and reflect the time of creation and the last update, respectively.
|
|
490
|
+
- Automatic ID Generation: Each entity created gets a unique [id](https://docs.dyna-record.com/classes/default.html#id) generated by the uuidv4 method.
|
|
491
|
+
- This can be customized [IdAttribute](<(https://docs.dyna-record.com/functions/IdAttribute.html)>) to support custom id attributes
|
|
492
492
|
- Relationship Management: The ORM manages entity relationships through DynamoDB's single-table design patterns, creating and maintaining the necessary links between related entities.
|
|
493
493
|
- Conditional Checks: To ensure data integrity, the create method performs various conditional checks, such as verifying the existence of entities that new records relate to.
|
|
494
494
|
- Error Handling: Errors during the creation process are handled gracefully, with specific errors thrown for different failure scenarios, such as conditional check failures or transaction cancellations.
|
|
495
495
|
|
|
496
496
|
### FindById
|
|
497
497
|
|
|
498
|
-
[Docs](https://dyna-record.com/classes/default.html#findById)
|
|
498
|
+
[Docs](https://docs.dyna-record.com/classes/default.html#findById)
|
|
499
499
|
|
|
500
500
|
Retrieve a single record by its primary key.
|
|
501
501
|
|
|
@@ -529,7 +529,7 @@ const course = await Course.findById("123", {
|
|
|
529
529
|
|
|
530
530
|
### Query
|
|
531
531
|
|
|
532
|
-
[Docs](https://dyna-record.com/classes/default.html#query)
|
|
532
|
+
[Docs](https://docs.dyna-record.com/classes/default.html#query)
|
|
533
533
|
|
|
534
534
|
The query method is a versatile tool for querying data from DynamoDB tables using primary key conditions and various optional filters. This method enables fetching multiple items that match specific criteria, making it ideal for situations where more than one item needs to be retrieved based on attributes of the primary key (partition key and sort key).
|
|
535
535
|
|
|
@@ -835,7 +835,7 @@ const result = await Customer.query(
|
|
|
835
835
|
|
|
836
836
|
### Update
|
|
837
837
|
|
|
838
|
-
[Docs](https://dyna-record.com/classes/default.html#update)
|
|
838
|
+
[Docs](https://docs.dyna-record.com/classes/default.html#update)
|
|
839
839
|
|
|
840
840
|
The update method enables modifications to existing items in a DynamoDB table. It supports updating simple attributes, handling nullable fields, and managing relationships between entities, including updating and removing foreign keys. Only attributes defined on the model can be updated, and will be enforced via types and runtime schema validation.
|
|
841
841
|
|
|
@@ -850,7 +850,7 @@ await Customer.update("123", {
|
|
|
850
850
|
|
|
851
851
|
#### Removing attributes
|
|
852
852
|
|
|
853
|
-
Note: Attempting to remove a non nullable attribute will result in a [NullConstraintViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
|
|
853
|
+
Note: Attempting to remove a non nullable attribute will result in a [NullConstraintViolationError](https://docs.dyna-record.com/classes/NullConstraintViolationError.html)
|
|
854
854
|
|
|
855
855
|
```typescript
|
|
856
856
|
await ContactInformation.update("123", {
|
|
@@ -873,7 +873,7 @@ await PaymentMethod.update("123", {
|
|
|
873
873
|
|
|
874
874
|
Nullable foreign key references can be removed by setting them to null
|
|
875
875
|
|
|
876
|
-
Note: Attempting to remove a non nullable foreign key will result in a [NullConstraintViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
|
|
876
|
+
Note: Attempting to remove a non nullable foreign key will result in a [NullConstraintViolationError](https://docs.dyna-record.com/classes/NullConstraintViolationError.html)
|
|
877
877
|
|
|
878
878
|
```typescript
|
|
879
879
|
await Pet.update("123", {
|
|
@@ -967,7 +967,7 @@ const updatedInstance = await paymentMethodInstance.update(
|
|
|
967
967
|
|
|
968
968
|
### Delete
|
|
969
969
|
|
|
970
|
-
[Docs](https://dyna-record.com/classes/default.html#delete)
|
|
970
|
+
[Docs](https://docs.dyna-record.com/classes/default.html#delete)
|
|
971
971
|
|
|
972
972
|
The delete method is used to remove an entity from a DynamoDB table, along with handling the deletion of associated items in relationships (like HasMany, HasOne, BelongsTo) to maintain the integrity of the database schema.
|
|
973
973
|
|
|
@@ -344,52 +344,76 @@ type FallbackToSK<T extends DynaRecord, SK> = ExtractEntityFromSK<T, SK> extends
|
|
|
344
344
|
type StrictNarrowByNames<T extends DynaRecord, Names extends string> = [
|
|
345
345
|
ResolveEntityByName<T, Names>
|
|
346
346
|
] extends [never] ? never[] : Array<DistributeEntityAttributes<ResolveEntityByName<T, Names>>>;
|
|
347
|
+
/**
|
|
348
|
+
* Intersects resolved entity names with SK-derived entity names.
|
|
349
|
+
* Since `skCondition` is a DynamoDB key condition that physically limits which
|
|
350
|
+
* items are scanned, it always constrains the result — it's not just a filter.
|
|
351
|
+
*
|
|
352
|
+
* - If SK narrows → intersect `Names` with SK entities. Empty intersection → `never[]`.
|
|
353
|
+
* - If SK does not narrow → use `Names` alone via {@link NarrowByNames}.
|
|
354
|
+
*/
|
|
355
|
+
type IntersectWithSK<T extends DynaRecord, Names extends string, SK> = ExtractEntityFromSK<T, SK> extends infer SKNames ? ShouldNarrow<T, SKNames> extends true ? StrictNarrowByNames<T, Extract<Names, SKNames & string>> : NarrowByNames<T, Names> : NarrowByNames<T, Names>;
|
|
356
|
+
/**
|
|
357
|
+
* Strict variant of {@link IntersectWithSK} that preserves `never[]` for empty
|
|
358
|
+
* name sets. Used when `Names` is already the result of an intersection (e.g.
|
|
359
|
+
* filter keys ∩ $or blocks) and may be `never` — in that case the result must
|
|
360
|
+
* stay `never[]`, not fall back to `QueryResults<T>`.
|
|
361
|
+
*/
|
|
362
|
+
type StrictIntersectWithSK<T extends DynaRecord, Names extends string, SK> = ExtractEntityFromSK<T, SK> extends infer SKNames ? ShouldNarrow<T, SKNames> extends true ? StrictNarrowByNames<T, Extract<Names, SKNames & string>> : StrictNarrowByNames<T, Names> : StrictNarrowByNames<T, Names>;
|
|
347
363
|
/**
|
|
348
364
|
* When top-level filter keys narrow to `KeyNames`, also checks if `$or` blocks
|
|
349
|
-
* narrow independently. Since DynamoDB ANDs top-level conditions
|
|
350
|
-
* a record must satisfy both — so the matching entities are the intersection.
|
|
365
|
+
* and `skCondition` narrow independently. Since DynamoDB ANDs top-level conditions
|
|
366
|
+
* with `$or`, a record must satisfy both — so the matching entities are the intersection.
|
|
367
|
+
* Additionally, `skCondition` is a key condition that always constrains the result.
|
|
351
368
|
*
|
|
352
|
-
* - If `$or` also narrows → intersect with `KeyNames
|
|
353
|
-
* - If `$or` does not narrow →
|
|
369
|
+
* - If `$or` also narrows → intersect with `KeyNames`, then intersect with SK (strict).
|
|
370
|
+
* - If `$or` does not narrow → intersect `KeyNames` with SK.
|
|
354
371
|
*/
|
|
355
|
-
type IntersectKeysWithOr<T extends DynaRecord, KeyNames extends string, F> = ResolveOrBlockEntityNames<T, F> extends infer OrNames ? ShouldNarrow<T, OrNames> extends true ?
|
|
372
|
+
type IntersectKeysWithOr<T extends DynaRecord, KeyNames extends string, F, SK = unknown> = ResolveOrBlockEntityNames<T, F> extends infer OrNames ? ShouldNarrow<T, OrNames> extends true ? StrictIntersectWithSK<T, Extract<KeyNames, OrNames & string>, SK> : IntersectWithSK<T, KeyNames, SK> : IntersectWithSK<T, KeyNames, SK>;
|
|
356
373
|
/**
|
|
357
374
|
* Falls back to `$or` block resolution (by type or filter keys), then SK, then full union.
|
|
375
|
+
* When `$or` narrows, also intersects with SK since it always constrains the result.
|
|
358
376
|
*/
|
|
359
|
-
type FallbackToOrBlocks<T extends DynaRecord, F, SK> = ResolveOrBlockEntityNames<T, F> extends infer Names ? ShouldNarrow<T, Names> extends true ?
|
|
377
|
+
type FallbackToOrBlocks<T extends DynaRecord, F, SK> = ResolveOrBlockEntityNames<T, F> extends infer Names ? ShouldNarrow<T, Names> extends true ? IntersectWithSK<T, Names & string, SK> : FallbackToSK<T, SK> : FallbackToSK<T, SK>;
|
|
360
378
|
/**
|
|
361
379
|
* Falls back to top-level filter key resolution, then `$or`, then SK, then full union.
|
|
362
380
|
*
|
|
363
381
|
* When top-level keys narrow, also intersects with `$or` block narrowing (if any)
|
|
364
|
-
* because DynamoDB ANDs them — a record must satisfy
|
|
365
|
-
* and at least one `$or` block.
|
|
382
|
+
* and `skCondition` narrowing because DynamoDB ANDs them — a record must satisfy
|
|
383
|
+
* the key condition, the top-level filter, and at least one `$or` block.
|
|
366
384
|
*/
|
|
367
|
-
type FallbackToFilterKeys<T extends DynaRecord, F, SK> = EntityNamesFromKeys<T, FilterKeysOf<F>> extends infer Names ? ShouldNarrow<T, Names> extends true ? IntersectKeysWithOr<T, Names & string, F> : FallbackToOrBlocks<T, F, SK> : FallbackToOrBlocks<T, F, SK>;
|
|
385
|
+
type FallbackToFilterKeys<T extends DynaRecord, F, SK> = EntityNamesFromKeys<T, FilterKeysOf<F>> extends infer Names ? ShouldNarrow<T, Names> extends true ? IntersectKeysWithOr<T, Names & string, F, SK> : FallbackToOrBlocks<T, F, SK> : FallbackToOrBlocks<T, F, SK>;
|
|
368
386
|
/**
|
|
369
|
-
* When a top-level `type` filter narrows, also checks if `$or` blocks
|
|
370
|
-
* to a disjoint set. Since DynamoDB ANDs them, the
|
|
387
|
+
* When a top-level `type` filter narrows, also checks if `$or` blocks and
|
|
388
|
+
* `skCondition` narrow to a disjoint set. Since DynamoDB ANDs them, the
|
|
389
|
+
* result is the intersection of all narrowing signals.
|
|
371
390
|
*/
|
|
372
|
-
type IntersectTypeWithOr<T extends DynaRecord, F> = ResolveOrBlockEntityNames<T, F> extends infer OrNames ? ShouldNarrow<T, OrNames> extends true ?
|
|
391
|
+
type IntersectTypeWithOr<T extends DynaRecord, F, SK = unknown> = ResolveOrBlockEntityNames<T, F> extends infer OrNames ? ShouldNarrow<T, OrNames> extends true ? StrictIntersectWithSK<T, Extract<ExtractTypeFromFilter<F> & string, OrNames & string>, SK> : IntersectWithSK<T, ExtractTypeFromFilter<F> & string, SK> : IntersectWithSK<T, ExtractTypeFromFilter<F> & string, SK>;
|
|
373
392
|
/**
|
|
374
393
|
* Infers query results from filter and SK for the non-index query overload.
|
|
375
394
|
*
|
|
376
395
|
* Narrowing strategy (respects DynamoDB's AND semantics):
|
|
377
396
|
* 1. If the filter specifies a top-level `type` value, narrow by that — then intersect
|
|
378
|
-
* with `$or` narrowing
|
|
397
|
+
* with `$or` narrowing and `skCondition` narrowing if present.
|
|
379
398
|
* 2. Otherwise, if top-level filter keys narrow to specific entities, use that — then
|
|
380
|
-
* intersect with `$or` narrowing if present.
|
|
381
|
-
* 3. Otherwise, if `$or` blocks resolve to specific entities (by type or keys), use that
|
|
399
|
+
* intersect with `$or` narrowing and `skCondition` narrowing if present.
|
|
400
|
+
* 3. Otherwise, if `$or` blocks resolve to specific entities (by type or keys), use that —
|
|
401
|
+
* then intersect with `skCondition` narrowing if present.
|
|
382
402
|
* 4. Otherwise, if `skCondition` matches an exact entity name or `$beginsWith` an entity name, narrow by that.
|
|
383
403
|
* 5. Otherwise, return the full `QueryResults<T>` union.
|
|
384
404
|
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
405
|
+
* `skCondition` is always intersected with other narrowing signals because it is a
|
|
406
|
+
* DynamoDB key condition that physically limits which items are scanned, unlike
|
|
407
|
+
* filter expressions which are applied post-scan.
|
|
408
|
+
*
|
|
409
|
+
* When multiple narrowing signals resolve to different entity sets, the intersection
|
|
410
|
+
* is taken. An empty intersection produces `never[]`, reflecting that no DynamoDB
|
|
411
|
+
* record can satisfy all combined conditions.
|
|
388
412
|
*
|
|
389
413
|
* @template T - The root entity being queried.
|
|
390
414
|
* @template F - The inferred filter type (captured via `const` generic).
|
|
391
415
|
* @template SK - The inferred sort key condition type.
|
|
392
416
|
*/
|
|
393
|
-
export type InferQueryResults<T extends DynaRecord, F, SK = unknown> = ExtractTypeFromFilter<F> extends infer Names ? ShouldNarrow<T, Names> extends true ? IntersectTypeWithOr<T, F> : FallbackToFilterKeys<T, F, SK> : FallbackToFilterKeys<T, F, SK>;
|
|
417
|
+
export type InferQueryResults<T extends DynaRecord, F, SK = unknown> = ExtractTypeFromFilter<F> extends infer Names ? ShouldNarrow<T, Names> extends true ? IntersectTypeWithOr<T, F, SK> : FallbackToFilterKeys<T, F, SK> : FallbackToFilterKeys<T, F, SK>;
|
|
394
418
|
export {};
|
|
395
419
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/operations/Query/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EACV,aAAa,IAAI,kBAAkB,EACnC,YAAY,IAAI,mBAAmB,EACnC,WAAW,EACX,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG;IAC/C;;OAEG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,IAAI,CACvE,YAAY,EACZ,WAAW,GAAG,QAAQ,GAAG,aAAa,CACvC,GAAG;IACF,MAAM,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG;IACnD,SAAS,EAAE,MAAM,CAAC;IAElB,cAAc,CAAC,EAAE,KAAK,CAAC;CACxB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,UAAU,GAAG,UA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