antoniop
committed
on 07 Feb 19
Exploit new -with_headers flag in db_list_of_lists to reimplement db_foreach in a way that only one db handle is used

Advantages:
- api is… Show more
Exploit new -with_headers flag in db_list_of_lists to reimplement db_foreach in a way that only one db handle is used

Advantages:

- api is now transaction safe (with respect to database operations executed in the code block)

- nested db_foreach statements won't risk to occupy all available handles anymore

Possible drawbacks:

- query result needs to be completely stored inside a list before looping

- calling stack is now one level deeper...

This passes automated tests

Show less