fsprojects / FSharp.AWS.DynamoDB

F# wrapper API for AWS DynamoDB
MIT License
58 stars 18 forks source link

Support `TransactWriteItems` across multiple tables/record types #60

Open samritchie opened 1 year ago

samritchie commented 1 year ago

See discussion in #59 - there would be value in supporting transactional writes across multiple tables (or contexts in the case of multiple single-table contexts).

Probably the main question here is around the 'base' context - eg the below suggested design approach from @bartelink:

let dynamo : DynamoContext = DynamoContext(client : IAmazonDynamoDB, ?metricsCollector : RequestMetrics -> unit)
let! residual = dynamo.Batch.Write( [contextFoo.Batch.Put fooItems; contextBar.Batch.Put barItems])