Closed nxvipin closed 4 years ago
Issue #122
This PR introduces support for Dynamo DB transactions. This is up for initial feedback.
TransactWriteItems
ConditionCheck
Put
Delete
Update
Get
Sample TransactWriteItems call:
(far/transact-write-items *client-opts* {:client-req-token "foobar" :return-cc? true :items [{:cond-check {:table-name ttable :prim-kvs {:id 300} :cond-expr "attribute_exists(#id)" :expr-attr-names {"#id" "id"}}} {:put {:table-name ttable :item i2 :cond-expr "attribute_not_exists(#id)" :expr-attr-names {"#id" "id"}}} {:delete {:table-name ttable :prim-kvs {:id 302} :cond-expr "attribute_exists(#id)" :expr-attr-names {"#id" "id"}}} {:update {:table-name ttable :prim-kvs {:id 300} :update-expr "SET #name = :name" :cond-expr "attribute_exists(#id) AND #name = :oldname" :expr-attr-names {"#id" "id", "#name" "name"} :expr-attr-vals {":oldname" "foo", ":name" "foofoo"}}}]})
Sample TransactGetItems call:
TransactGetItems
(far/transact-get-items *client-opts* {:return-cc? true :items [{:table-name ttable :prim-kvs {:id 1}} {:table-name ttable :prim-kvs {:id 2}}]})
Closing this in favour of https://github.com/Taoensso/faraday/pull/145 which is basically this PR rebased on latest master.
Issue #122
This PR introduces support for Dynamo DB transactions. This is up for initial feedback.
TransactWriteItems
is supported with all the operations:ConditionCheck
Put
Delete
Update
.Get
operation[x] Tests
Sample
TransactWriteItems
call:Sample
TransactGetItems
call: