virgil icon indicating copy to clipboard operation
virgil copied to clipboard

Implement CQL.unbatched

Open calvinlfer opened this issue 3 years ago • 2 comments

Let's say you have a set of mutations in a single batch but you decide that you no longer want them in a batch:

val batchMutation = update1 + insert1 + update2 
val individualMutations: NonEmptyChunk[CQL[MutationResult]] = CQL.unbatched { batchMutation }

Currently, we track each individual mutation in a NonEmptyChunk but if we wanted to provide the user with each of the individual mutations in an API like so:

val batchMutation = update1 + insert1 + update2 
val u1 :*: i1 :*: u2 :*: Finish = CQL.unbatched { batchMutation }

Then we would need to use an HList and keep track of each insertion

calvinlfer avatar Feb 13 '22 00:02 calvinlfer