Add sql.ShardSet, a way to map auto incrementing IDs across multiple databases.
Add sql.ShardSet, a way to map auto incrementing IDs across multiple databases.

Each database is expected to have a common name prefix, e.g "Dogo" for "Dogo1", "Dogo2", etc.
By setting sql.MaxShards you control how many shards there may be in the future. E.g with MaxShards=4, you will have IDs 1, 5, 9, etc live in Dogo1, IDs 2, 6, 10, etc in Dogo2, and so on.
You should probably set MaxShards to a high number (it defaults to 65000), since this will allow for a massive number of shards in the future. In the meantime, you can have ShardSet.NumShards be much smaller (e.g 1) in case you will not have a ton of shards off the bat

ASAPPinc/fun-go,marcuswestin/fun-go,marcuswestin/FunGo