bin/dump.js
function dumpDatabase(db, allzones) {
  var sources = db.getSources();
  for (var n = 0; n < sources.length; n++) {
    util.logContextInfo(sources[n].getContextInfo());
  }

  var zones = db.getZones();
  if (!zones.length) {
    console.log('No zones');
    return 0;
  }

  var count = allzones ? zones.length : 1;
  for (var i = 0; i < count; ++i) {
    var zone = zones[i];
    var eventList = zone.getEventList();
    var it = eventList.begin();
    for (; !it.done(); it.next()) {
      util.logEvent(it, zone);
    }

  }
  return 0;
}
function dumpDatabase(db, allzones) {
  var sources = db.getSources();
  for (var n = 0; n < sources.length; n++) {
    util.logContextInfo(sources[n].getContextInfo());
  }

  var zones = db.getZones();
  if (!zones.length) {
    console.log('No zones');
    return 0;
  }

  var count = allzones ? zones.length : 1;
  for (var i = 0; i < count; ++i) {
    var zone = zones[i];
    var eventList = zone.getEventList();
    var it = eventList.begin();
    for (; !it.done(); it.next()) {
      util.logEvent(it, zone);
    }

  }
  return 0;
}
function dumpDatabase ( db , allzones ) { var sources = db . getSources ( ) ; for ( var n = 0 ; n < sources . length ; n ++ ) { util . logContextInfo ( sources [ n ] . getContextInfo ( ) ) ; } var zones = db . getZones ( ) ; if ( ! zones . length ) { console . log ( 'No zones' ) ; return 0 ; } var count = allzones ? zones . length : 1 ; for ( var i = 0 ; i < count ; ++ i ) { var zone = zones [ i ] ; var eventList = zone . getEventList ( ) ; var it = eventList . begin ( ) ; for ( ; ! it . done ( ) ; it . next ( ) ) { util . logEvent ( it , zone ) ; } } return 0 ; }
Dump the database.
@param {!wtf.db.Database} db Database.
@param {!boolean} allzones Whether it's needed to dump all the zones or just the first one
@return {number} Return code.
Dump the database .