modules/query/StopsTable.js
function _queryForStopByName(db, query, callback) {

  // Perform the search query
  db.get(query, function(err, result) {

    // No stop found, return undefined
    if ( result === undefined ) {
      return callback(undefined);
    }

    // Stop found, return the Stop from it's ID
    getStop(db, result.stop_id, function(err, stop) {
      return callback(stop);
    });

  });

}
function _queryForStopByName(db, query, callback) {

  // Perform the search query
  db.get(query, function(err, result) {

    // No stop found, return undefined
    if ( result === undefined ) {
      return callback(undefined);
    }

    // Stop found, return the Stop from it's ID
    getStop(db, result.stop_id, function(err, stop) {
      return callback(stop);
    });

  });

}
function _queryForStopByName ( db , query , callback ) { // Perform the search query db . get ( query , function ( err , result ) { // No stop found, return undefined if ( result === undefined ) { return callback ( undefined ) ; } // Stop found, return the Stop from it's ID getStop ( db , result . stop_id , function ( err , stop ) { return callback ( stop ) ; } ) ; } ) ; }
Perform a query searching for Stop by it's name
@param {RightTrackDB} db The Right Track Database to query
@param {string} query The full SELECT query to perform
@param {function} callback Callback function(Stop)
@private
Perform a query searching for Stop by it s name