Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated indexes in models

  • Loading branch information...
commit b978a63c2796ce60750410bf3759c477b5723f07 1 parent 086fd4e
@brendannee brendannee authored
View
2  lib/gtfs.js
@@ -163,8 +163,6 @@ module.exports = {
});
function getTrips(cb){
- Trip.find({agency_key: agency_key}).run(function(e, result){ console.log(result) });
-
Trip
.count({
agency_key: agency_key
View
2  models/Stop.js
@@ -3,7 +3,7 @@ var mongoose = require('mongoose')
var Stop = mongoose.model('Stop', new Schema({
agency_key : { type: String, index: true }
- , stop_id : { type: String }
+ , stop_id : { type: String, index: true }
, stop_code : { type: String }
, stop_name : { type: String }
, stop_desc : { type: String }
View
4 models/StopTime.js
@@ -6,8 +6,8 @@ var StopTime = mongoose.model('StopTime', new Schema({
agency_key : { type: String, index: true }
, trip_id : { type: String, index: true }
, arrival_time : { type: String, get: utils.secondsToTime, set: utils.timeToSeconds }
- , departure_time : { type: String, index:true, get: utils.secondsToTime, set: utils.timeToSeconds }
- , stop_id : { type: String, index:true }
+ , departure_time : { type: String, index: true, get: utils.secondsToTime, set: utils.timeToSeconds }
+ , stop_id : { type: String, index: true }
, stop_sequence : { type: Number, index: true }
, stop_headsign : { type: String }
, pickup_type : { type: String }
View
4 models/Trip.js
@@ -4,11 +4,11 @@ var mongoose = require('mongoose')
var Trip = mongoose.model('Trip', new Schema({
agency_key : { type: String, index: true }
, route_id : { type: String, index: true }
- , service_id : { type: String, index:true }
+ , service_id : { type: String, index: true }
, trip_id : { type: String }
, trip_headsign : { type: String }
, trip_short_name : { type: String }
- , direction_id : { type: Number, index:true, min:0, max:1 }
+ , direction_id : { type: Number, index: true, min:0, max:1 }
, block_id : { type: String }
, shape_id : { type: String }
}, { strict: true }));
Please sign in to comment.
Something went wrong with that request. Please try again.