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
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ An item can be retrieved from the DynamoDB table using the following-
120
120
let retrievedItem: StandardTypedDatabaseItem<PayloadType>?=tryawait table.getItem(forKey: key)
121
121
```
122
122
123
-
The `getItem` operation return an optional `TypedDatabaseItem` which will be nil if the item doesn't exist in the table. These operations will also fail if the *RowType* recorded in the database row doesn't match the type being requested.
123
+
The `getItem` operation return an optional `TypedTTLDatabaseItem` which will be nil if the item doesn't exist in the table. These operations will also fail if the *RowType* recorded in the database row doesn't match the type being requested.
124
124
125
125
## Update
126
126
@@ -623,7 +623,7 @@ By default, this operation will fail if an item with the same partition key and
623
623
The main entities provided by this package are
624
624
**CompositePrimaryKey*: a struct that stores the partition and sort values for a composite primary key.
625
625
**TimeToLive*: a struct that stores TTL timestamp for a database item.
626
-
**TypedDatabaseItemWithTimeToLive*: a struct that manages decoding and encoding rows of a particular type along with any TTL settings from polymorphic database tables.
626
+
**TypedTTLDatabaseItem*: a struct that manages decoding and encoding rows of a particular type along with any TTL settings from polymorphic database tables.
627
627
**TypedDatabaseItem*: a typealias that points to `TypedDatabaseItemWithTimeToLive` with default `StandardTimeToLiveAttributes` generic type for backwards compatibility.
628
628
**PolymorphicDatabaseItem*: a struct that manages decoding rows that are one out of a number of types from polymorphic database tables.
629
629
**DynamoDBCompositePrimaryKeyTable*: a protocol for interacting with a DynamoDB database table.
@@ -647,15 +647,15 @@ The TimeToLive struct defines the TTL timestamp value for a row in the database.
647
647
let timeToLive =StandardTimeToLive(timeToLiveTimestamp: 123456789)
648
648
```
649
649
650
-
## TypedDatabaseItemWithTimeToLive
650
+
## TypedTTLDatabaseItem
651
651
652
-
The TypedDatabaseItemWithTimeToLive struct manages a number of attributes in the database table to enable decoding and encoding rows to and from the correct type. In addition it also manages other conveniences such as versioning. The attributes this struct will add to a database row are-
652
+
The TypedTTLDatabaseItem struct manages a number of attributes in the database table to enable decoding and encoding rows to and from the correct type. In addition it also manages other conveniences such as versioning. The attributes this struct will add to a database row are-
653
653
**CreateDate*: The timestamp when the row was created.
654
654
**RowType*: Specifies the schema used by the other attributes of this row.
655
655
**RowVersion*: A version number for the values currently in this row. Used to enable optimistic locking.
656
656
**LastUpdatedDate*: The timestamp when the row was last updated.
657
657
658
-
Similar to CompositePrimaryKey, this package provides a typealias called `StandardTypedDatabaseItem` that expects the standard partition, sort key, and TTL attribute names.
658
+
Similar to CompositePrimaryKey, this package provides a typealias called `TypedDatabaseItem` that expects the standard partition, sort key, and TTL attribute names.
659
659
660
660
This struct can be instantiated as shown-
661
661
@@ -683,7 +683,7 @@ or with TTL-
683
683
let updatedDatabaseItem = newDatabaseItem.createUpdatedItem(withValue: updatedValue, andTimeToLive: updatedTimeToLive)
684
684
```
685
685
686
-
This function will create a new instance of TypedDatabaseItemWithTimeToLive with the same key and updated LastUpdatedDate and RowVersion values. By default, performing a **PutItem** operation with this item on a table where this row already exists and the RowVersion isn't equal to the value of the original row will fail.
686
+
This function will create a new instance of TypedTTLDatabaseItem with the same key and updated LastUpdatedDate and RowVersion values. By default, performing a **PutItem** operation with this item on a table where this row already exists and the RowVersion isn't equal to the value of the original row will fail.
687
687
688
688
## DynamoDBCompositePrimaryKeyTable
689
689
@@ -703,7 +703,7 @@ Internally `AWSDynamoDBCompositePrimaryKeyTable` uses a custom Decoder and Encod
703
703
704
704
## PrimaryKeyAttributes
705
705
706
-
`CompositePrimaryKey`, `TypedDatabaseItemWithTimeToLive` and `PolymorphicDatabaseItem` are all generic to a type conforming to the `PrimaryKeyAttributes` protocol. This protocol can be used to use custom attribute names for the partition and sort keys.
706
+
`CompositePrimaryKey`, `TypedTTLDatabaseItem` and `PolymorphicDatabaseItem` are all generic to a type conforming to the `PrimaryKeyAttributes` protocol. This protocol can be used to use custom attribute names for the partition and sort keys.
@@ -718,7 +718,7 @@ public struct MyPrimaryKeyAttributes: PrimaryKeyAttributes {
718
718
719
719
## TimeToLiveAttributes
720
720
721
-
`TimeToLive`, `TypedDatabaseItemWithTimeToLive` and `PolymorphicDatabaseItem` are all generic to a type conforming to the `TimeToLiveAttributes` protocol. This protocol can be used to use custom attribute names for the TTL timestamp.
721
+
`TimeToLive`, `TypedTTLDatabaseItem` and `PolymorphicDatabaseItem` are all generic to a type conforming to the `TimeToLiveAttributes` protocol. This protocol can be used to use custom attribute names for the TTL timestamp.
0 commit comments