You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would allow passing around a query, which would get executed at the point at which someone tries to iterate it. This approach would give greater flexibility - since at each level of processing, further conditions / relations could be added. It would also remove the need for \Orm\Query::get().
The text was updated successfully, but these errors were encountered:
But it would not remove the get(), as that is actually the SQL execution trigger which would create the iterable class. You will have to create and populate it before you can access it's data.
I thought that the class could keep track of whether the internal store of models had been generated, and trigger the SQL on the first iteration (or the first iteration after new conditions have been added). Then you don't need to care about whether the data has been fetched yet or not.
This would allow passing around a query, which would get executed at the point at which someone tries to iterate it. This approach would give greater flexibility - since at each level of processing, further conditions / relations could be added. It would also remove the need for \Orm\Query::get().
The text was updated successfully, but these errors were encountered: