Method: OccamsRecord::Query#cursor
- Defined in:
- lib/occams-record/query.rb
#cursor(name: nil, scroll: nil, hold: nil) ⇒ OccamsRecord::Cursor
Returns a cursor you can open and perform operations on. A lower-level alternative to find_each_with_cursor and find_in_batches_with_cursor.
NOTE Postgres only. See the docs for OccamsRecord::Cursor for more details.
226 227 228 229 230 231 |
# File 'lib/occams-record/query.rb', line 226 def cursor(name: nil, scroll: nil, hold: nil) Cursor.new(model.connection, scope.to_sql, name: name, scroll: scroll, hold: hold, use: @use, query_logger: @query_logger, eager_loaders: @eager_loaders, ) end |