Parent

Methods

Files

CouchRest::Upgrade

Attributes

dbname[RW]
newdb[RW]
olddb[RW]

Public Class Methods

new(dbname, old_couch, new_couch) click to toggle source
# File lib/couchrest/helper/upgrade.rb, line 4
def initialize dbname, old_couch, new_couch
  @dbname = dbname
  @olddb = old_couch.database dbname
  @newdb = new_couch.database!(dbname)
  @bulk_docs = []
end

Public Instance Methods

clone!() click to toggle source
# File lib/couchrest/helper/upgrade.rb, line 10
def clone!
  puts "#{dbname} - #{olddb.info['doc_count']} docs"
  streamer  = CouchRest::Streamer.new(olddb)
  streamer.view("_all_docs_by_seq") do |row|
    load_row_docs(row) if row
    maybe_flush_bulks
  end
  flush_bulks!
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.