You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add `ReadonlyArray` type for ITFS compat ([84f70df](https://github.com/Nerdware-LLC/ddb-single-table/commit/84f70dfff8e3e671442b1820addc2437356070f7))
15
+
* add checks for `Date` objects in `recurse` fn, update types ([7b24cd4](https://github.com/Nerdware-LLC/ddb-single-table/commit/7b24cd43c5488c51ebc5240520b87390ec9bec6b))
16
+
* replace `NativeAttributeValue` w `SupportedAttributeValueType` for Dates ([4a0dd06](https://github.com/Nerdware-LLC/ddb-single-table/commit/4a0dd06243f40a9be85eb97e719736e4e7ca9b8d))
17
+
* replace inline `string | number` w `AttrValue` generic for correct typing ([e9adeaa](https://github.com/Nerdware-LLC/ddb-single-table/commit/e9adeaa06c12490f3373dbd6edb7fe9028632f3d))
18
+
* update named import for 'EnsureTableIsActiveParameters' ([bae628a](https://github.com/Nerdware-LLC/ddb-single-table/commit/bae628a09ea0512341126e29755a462399bca44c))
19
+
20
+
21
+
### Code Refactoring
22
+
23
+
* mv Date-conversion from Model IO-Action to `DdbClientFieldParser` ([d2a574c](https://github.com/Nerdware-LLC/ddb-single-table/commit/d2a574cc76ba576b159927e6f8dfd8dfe100a7a6))
24
+
* update Model methods to use new `DdbClientWrapper` return values ([e8a7bb5](https://github.com/Nerdware-LLC/ddb-single-table/commit/e8a7bb5064699be6571d5ea948f96d4914a17dd3))
* add `UnknownItem` type, update `BaseItem` to use `SupportedAttributeValueType` ([ffec182](https://github.com/Nerdware-LLC/ddb-single-table/commit/ffec1826576aefb5bb0faa1941d0ac9b5a678209))
32
+
* add DdbClientArgParser for improved command argument handling and response parsing ([bdba380](https://github.com/Nerdware-LLC/ddb-single-table/commit/bdba380165321163295d6ae6d37b6e7f9a658dab))
33
+
* add export of `Model/types/*` ([8e6b95f](https://github.com/Nerdware-LLC/ddb-single-table/commit/8e6b95f63067a4e121f73baff982c70567174637))
34
+
* add FixPartialUndefined and OverrideSharedProperties types ([6a10d78](https://github.com/Nerdware-LLC/ddb-single-table/commit/6a10d78684cc9c189b0253a6b23dad2343b37042))
35
+
* add type `AttributeFunctionDefault` ([77dd84e](https://github.com/Nerdware-LLC/ddb-single-table/commit/77dd84ea2a7dde3ad6fddd81e5f4eae34bfe1931))
36
+
* rm export of NestDepth internal util types ([4fd364e](https://github.com/Nerdware-LLC/ddb-single-table/commit/4fd364e13d46f4d30784c6e4ad5dcc4994ece442))
37
+
38
+
39
+
### Reverts
40
+
41
+
* switch `transformItem` and `validateItem` param types back to `any` ([00b2525](https://github.com/Nerdware-LLC/ddb-single-table/commit/00b25253150b24132e57f4b515b39f46e298ad21))
42
+
43
+
44
+
### BREAKING CHANGES
45
+
46
+
*`schemaWithKeysOnly` has been rm'd, and batch methods filter unproc'd reqs.
47
+
* Date-conversion has been moved from `Model` to `DdbClientFieldParser`.
Copy file name to clipboardExpand all lines: README.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -303,7 +303,10 @@ Marshalling ✅ Validation ✅ Where-style query API ✅ and more. <br>
303
303
304
304
## 🧙♂️ Data IO Order of Operations
305
305
306
-
When any Model method is invoked, it begins a request-response cycle in which DDB-ST applies a series of transformations and validations to ensure that the data conforms to the schema defined for the Model. DDB-ST collectively refers to these transformations and validations as _"**IO-Actions**"_, and they are categorized into two groups: `toDB` and `fromDB`. The `toDB` actions are applied to Model-method arguments before they're passed off to the underlying AWS SDK, while the `fromDB` actions are applied to all values returned from the AWS SDK before they're returned to the caller.
306
+
When any Model method is invoked, it begins a request-response cycle in which DDB-ST applies a series of transformations and validations to ensure that the data conforms to the schema defined for the Model. DDB-ST collectively refers to these transformations and validations as _"**IO-Actions**"_, and they are categorized into two groups — `toDB` and `fromDB`:
307
+
308
+
-`toDB` actions are applied to Model-method arguments before they're passed off to the underlying AWS SDK.
309
+
-`fromDB` actions are applied to all values returned from the AWS SDK before they're returned to the caller.
307
310
308
311
The `toDB` and `fromDB` flows both have a specific order in which **IO-Actions** are applied.
309
312
@@ -321,17 +324,15 @@ The `toDB` and `fromDB` flows both have a specific order in which **IO-Actions**
321
324
| 5 |[**`Type Checking`**](#type)| Checks properties for conformance with their `"type"`. ||
@@ -580,12 +581,10 @@ Optional default value to apply. This can be configured as either a straight-for
580
581
> With the exception of `updateItem` calls, an attribute's value is set to this `default` if the initial value provided to the Model method is `undefined` or `null`.
581
582
582
583
-##### When using a primitive-value `default`
583
-
584
584
- The primitive's type must match the attribute's `type`, otherwise the Model's
585
585
constructor will throw an error.
586
586
587
587
-##### When using a function `default`
588
-
589
588
- The function is called with the entire item-object provided to the Model method _**with
590
589
UNALIASED keys**_, and the attribute value is set to the function's returned value.
591
590
-_This package does not validate functional `default`s._
@@ -808,7 +807,6 @@ DDB-ST models provide a high-level API for batching CRUD operations that handles
808
807
1. First request: no delay
809
808
2. Second request: delay `initialDelay` milliseconds (_default:_ 100)
810
809
3. All subsequent request delays are equal to the previous delay multiplied by the `timeMultiplier` (_default:_ 2), until either:
811
-
812
810
- The `maxRetries` limit is reached (_default:_ 10), or
813
811
- The `maxDelay` limit is reached (_default:_ 3500, or 3.5 seconds)
814
812
@@ -833,6 +831,7 @@ DDB-ST models provide a high-level API for batching CRUD operations that handles
833
831
**A:** DDB-ST provides a wrapper around the DynamoDB client:
834
832
835
833
- To simplify client usage, the wrapper handles all marshalling and unmarshalling of data to/from DynamoDB types.
834
+
- The wrapper also handles conversion of JS `Date` objects to/from ISO-8601 datetime strings.
836
835
- To ensure client resources like socket connections are cleaned up, a listener is attached to the process "exit" event which calls the client's `destroy()` method.
837
836
838
837
### Q: _What version of the AWS SDK does DDB-ST use?_<!-- omit in toc -->
0 commit comments