lib/wyrm/pump.rb
# Dump the serialization of the table to the specified io.
#
# TODO need to also dump a first row containing useful stuff:
# - source table name
# - number of rows
# - source db url
# - permissions?
# These should all be in one object that can be Marshall.load-ed easily.
#
# TODO could speed this up by have a query thread which runs the next page-query while
# the current one is being written/compressed.
Dump the serialization of the table to the specified io.
TODO need to also dump a first row containing useful stuff:
source table name
number of rows
source db url
permissions.
These should all be in one object that can be Marshall.load-ed easily.


Dump the serialization of the table to the specified io . TODO need to also dump a first row containing useful stuff : source table name number of rows source db url permissions . These should all be in one object that can be Marshall . load - ed easily .
def dump
      _dump do |row|
        codec.encode( row.values, io ) unless dry_run?
      end
    ensure
      io.flush
    end
def dump _dump do | row | codec . encode ( row . values , io ) unless dry_run? end ensure io . flush end
Dump the serialization of the table to the specified io.
Dump the serialization of the table to the specified io .