Add SqlListLazy to OrmLite
When using raw SQL, due to having complex CTE queries, that does not start with
SELECT but rather with
SqlList method loads everything in one go.
This is unfortunate when the result set is large, and we would like to process one row at a time, and avoid the memory overhead, and waiting time, of getting the whole result set at once.
SelectLazy would have solved this problem, if it had supported any arbitrary SQL, but it does not.
According to the documentation
SelectLazy can do this if the SQL starts with
SELECT however, for our case the query is a CTE, so it starts with
SqlListLazy that allows us to run complex CTE queries efficiently would solve this.
SelectLazy to recognise CTE queries that start with
For documentation on the WITH syntax in PostgreSQL see https://www.postgresql.org/docs/11/queries-with.html
This should now be supported using the existing `SelectLazy` APIs from v5.7.1+ that’s now available on MyGet.