var K = require('./build/default/_kyoto'),
    Fs = require('fs'),
    db = new K.PolyDB();

db.open('insert.kch', K.PolyDB.OREADER, begin);

function begin(err) {
  var alpha = new K.Cursor(db),
      bravo = new K.Cursor(db);

  alpha.next(function(err, val) {
    console.log('alpha', err, val);
    bravo.next(function(err, val) {
      console.log('bravo', err, val);
      alpha.next(function(err, val) {
        console.log('alpha', err, val);
        bravo.next(function(err, val) {
          console.log('bravo', err, val);
          db.close(function() {});
        });
      });
    });
  });
}
