Add support for named cursor
#5817 (closed) proposed to replace fetchall by iteration. But there are cases where using a named cursor would be even better.
I think it is possible to add support for it because SQLite uses already a custom class for Connection which could ignore the name.
Once we have it we need to find a way to decide when to use a named cursor or not. This depends mainly on the size of the result. The ModelSQL.search
could check if there is no limit to use it and the ModelSQL.read
could check the size of list of ids.