Closed bramantoleksono closed 2 years ago
Interesting! How about we turn get_next_id
into a generator and have it yield larger letter sequences? For example, after a-z
the next item is aa
, then ab
, ac
. That shouldn't be too hard to code up and would solve this problem for a much larger (infinite? :)) number of params. Also, can you include tests?
Hi there. I'm proposing a change the params dict key to use ascii_letters. Current code use ascii_lowercase and we hits the params limit. By using ascii_letters, we can store up to 52 params in a query. I'm open for suggestion if there's a better approach.