modules/query/LineGraphTable.js
function _addGraphVertices(db, graph, callback) {

  // Get all Stops
  StopsTable.getStops(db, function(err, stops) {

    // Database Query Error
    if ( err ) {
      return callback(err);
    }

    // Add each Stop as a Vertex
    for ( let i = 0; i < stops.length; i++ ) {
      graph.addNewVertex(stops[i].id, stops[i]);
    }

    // Return the Graph
    return callback(null, graph);

  });

}
function _addGraphVertices(db, graph, callback) {

  // Get all Stops
  StopsTable.getStops(db, function(err, stops) {

    // Database Query Error
    if ( err ) {
      return callback(err);
    }

    // Add each Stop as a Vertex
    for ( let i = 0; i < stops.length; i++ ) {
      graph.addNewVertex(stops[i].id, stops[i]);
    }

    // Return the Graph
    return callback(null, graph);

  });

}
function _addGraphVertices ( db , graph , callback ) { // Get all Stops StopsTable . getStops ( db , function ( err , stops ) { // Database Query Error if ( err ) { return callback ( err ) ; } // Add each Stop as a Vertex for ( let i = 0 ; i < stops . length ; i ++ ) { graph . addNewVertex ( stops [ i ] . id , stops [ i ] ) ; } // Return the Graph return callback ( null , graph ) ; } ) ; }
Add all Stops as Vertices to the Graph
@param {RightTrackDB} db The Right Track DB to query
@param {Graph} graph The Graph to add vertices to
@param {function} callback Callback function(err, graph)
@private
Add all Stops as Vertices to the Graph