tarantool/crud

Allow to traverse over crud.cfg using pairs()

DifferentialOrange opened this issue · 2 comments

Follows up #244

Unlike pairs(box.cfg), pairs(crud.cfg) will now work. Not really a bit deal, since here we have no backward compatibility guarantees.

However maybe it worth to add crud.cfg:pairs() and mention it in the documentation: just to don't let users write a wrong code with pairs(crud.cfg) or fun.iter(crud.cfg). Or add crud.cfg:unwrap(), which returns a pure table. Or crud.cfg:copy(), which returns a copy. Don't know.

Maybe it is not needed for anyone. OTOH, using fun.chain() to merge several configs is quite useful. Say, when you have a default one, one collected from env and one provided in arguments. But whether we can need a current config is such chains? Don't know.

Let's ignore it for now. It is not critical.

I also added some more thoughts into tarantool/tarantool#4521, if you're interested.

Originally posted by @Totktonada in #244 (comment)

Retriaged to wishlist. I propose to close it 2023-02-23 if it will not be requested by anyone else.

I think we may leave this ticket opened for now so someone may refer to it if needed (or solve it in free time if they wish so)