--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Uses a cursor for fetching records, instead of fetching the entire result set at once. Can be used to process large datasets without holding all rows in memory (which is what the underlying drivers do by default). Options:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":rows_per_fetch - the number of rows per fetch (default 1000). Higher numbers result in fewer queries but greater memory use."
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Usage:"
- !ruby/struct:SM::Flow::VERB 
  body: "  DB[:huge_table].use_cursor.each{|row| p row}\n  DB[:huge_table].use_cursor(:rows_per_fetch=&gt;10000).each{|row| p row}\n"
- !ruby/struct:SM::Flow::P 
  body: This is untested with the prepared statement/bound variable support, and unlikely to work with either.
full_name: Sequel::Postgres::Dataset#use_cursor
is_singleton: false
name: use_cursor
params: (opts={})
visibility: public
