scylladb / gocqlx

All-In-One: CQL query builder, ORM and migration tool
Apache License 2.0
927 stars 122 forks source link

Add helper function to group queries into batches by host / shard #204

Open mmatczuk opened 2 years ago

mmatczuk commented 2 years ago

This is in the context of https://github.com/scylladb/gocql/issues/90. It would be nice to add a dbutil that would partition batches to hosts and shards.

mmatczuk commented 2 years ago

There exists prior work that is over complex and over specialized in my view https://github.com/scylladb/gocqlx/pull/167.

One can see there there is a need for grouping queries to batches. It should be flexible to allow extending it to support other use cases.