Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module for creating update actions
Example as used in nested structure for scan:
updateItemByKey_ (Proxy :: Proxy Test, ("hashkey", "sortkey")) ((iInt' +=. 5) <> (iText' =. "updated") <> (iMText' =. Nothing))
The unique Action can be added together using the <>
operator. You are not supposed
to operate on the same attribute simultaneously using multiple actions.
Synopsis
- data Action t
- (+=.) :: (InCollection col tbl FullPath, DynamoScalar v typ, IsNumber typ) => Column typ TypColumn col -> typ -> Action tbl
- (-=.) :: (InCollection col tbl FullPath, DynamoScalar v typ, IsNumber typ) => Column typ TypColumn col -> typ -> Action tbl
- (=.) :: (InCollection col tbl FullPath, DynamoEncodable typ) => Column typ TypColumn col -> typ -> Action tbl
- setIfNothing :: (InCollection col tbl FullPath, DynamoEncodable typ) => Column (Maybe typ) TypColumn col -> typ -> Action tbl
- append :: (InCollection col tbl FullPath, DynamoEncodable typ) => Column [typ] TypColumn col -> [typ] -> Action tbl
- prepend :: (InCollection col tbl FullPath, DynamoEncodable typ) => Column [typ] TypColumn col -> [typ] -> Action tbl
- add :: (InCollection col tbl FullPath, DynamoEncodable (Set typ)) => Column (Set typ) TypColumn col -> Set typ -> Action tbl
- delete :: (InCollection col tbl FullPath, DynamoEncodable (Set typ)) => Column (Set typ) TypColumn col -> Set typ -> Action tbl
- delListItem :: InCollection col tbl FullPath => Column [typ] TypColumn col -> Int -> Action tbl
- delHashKey :: (InCollection col tbl FullPath, IsText key) => Column (HashMap key typ) TypColumn col -> key -> Action tbl
- dumpActions :: Action t -> Maybe (Text, HashMap Text Text, HashMap Text AttributeValue)
Documentation
An action for updateItemByKey
functions.
Update action
(+=.) :: (InCollection col tbl FullPath, DynamoScalar v typ, IsNumber typ) => Column typ TypColumn col -> typ -> Action tbl infix 4 Source #
Add a number to a saved attribute.
(-=.) :: (InCollection col tbl FullPath, DynamoScalar v typ, IsNumber typ) => Column typ TypColumn col -> typ -> Action tbl infix 4 Source #
Subtract a number from a saved attribute.
(=.) :: (InCollection col tbl FullPath, DynamoEncodable typ) => Column typ TypColumn col -> typ -> Action tbl infix 4 Source #
Set an attribute to a new value.
setIfNothing :: (InCollection col tbl FullPath, DynamoEncodable typ) => Column (Maybe typ) TypColumn col -> typ -> Action tbl Source #
Set on a Maybe type, if it was not set before.
append :: (InCollection col tbl FullPath, DynamoEncodable typ) => Column [typ] TypColumn col -> [typ] -> Action tbl Source #
Append a new value to an end of a list.
prepend :: (InCollection col tbl FullPath, DynamoEncodable typ) => Column [typ] TypColumn col -> [typ] -> Action tbl Source #
Insert a value to a beginning of a list
add :: (InCollection col tbl FullPath, DynamoEncodable (Set typ)) => Column (Set typ) TypColumn col -> Set typ -> Action tbl Source #
Add a new value to a set.
delete :: (InCollection col tbl FullPath, DynamoEncodable (Set typ)) => Column (Set typ) TypColumn col -> Set typ -> Action tbl Source #
Remove a value from a set.
delListItem :: InCollection col tbl FullPath => Column [typ] TypColumn col -> Int -> Action tbl Source #
Delete n-th list of an item.
delHashKey :: (InCollection col tbl FullPath, IsText key) => Column (HashMap key typ) TypColumn col -> key -> Action tbl Source #
Delete a key from a map.