Class: Ductr::Postgres::BufferedDestination
- Inherits:
-
SequelBase::BufferedDestination
- Object
- SequelBase::BufferedDestination
- Ductr::Postgres::BufferedDestination
- Defined in:
- lib/ductr/postgres/buffered_destination.rb
Overview
A destination control that accumulates rows in a buffer to write them by batch, registered as :buffered.
Accept the :buffer_size option, default value is 10 000:
destination :some_postgres_database, :buffered, buffer_size: 42 def my_destination(db, buffer) db[:items].multi_insert(buffer) end