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
Add methods to the Model class that return a Generator that yields either an assoc arrays or a records. These methods will not be able to eager load related data because they are streaming
The Generator returned will yield a row (assoc array representing a row in the desired DB table) or a record object (representing a row in the desired DB table) on each loop iteration.
These new methods will use minimal & constant memory, but will most likely run not a fast as their fetch(Rows|Records)Into(Array|Collection) counterparts that use more memory as the number of records or rows to be fetched increases but run faster than these two new methods.
They would be very useful for long running applications with large data sets that are to be run in the background. They will be useful where you want to sequentially loop through all rows or records from a DB table with lots of data and you are running on a memory constrained machine.
The text was updated successfully, but these errors were encountered:
Add methods to the Model class that return a Generator that yields either an assoc arrays or a records. These methods will not be able to eager load related data because they are streaming
The Generator returned will yield a row (assoc array representing a row in the desired DB table) or a record object (representing a row in the desired DB table) on each loop iteration.
These new methods will use minimal & constant memory, but will most likely run not a fast as their fetch(Rows|Records)Into(Array|Collection) counterparts that use more memory as the number of records or rows to be fetched increases but run faster than these two new methods.
They would be very useful for long running applications with large data sets that are to be run in the background. They will be useful where you want to sequentially loop through all rows or records from a DB table with lots of data and you are running on a memory constrained machine.
The text was updated successfully, but these errors were encountered: