gtfs-sequelize
Advanced tools
Comparing version 0.2.1 to 0.2.2
14
index.js
@@ -7,6 +7,12 @@ var path = require('path'), | ||
module.exports = function(config) { | ||
return { | ||
return { | ||
config: config, | ||
connectToDatabase: function() { | ||
return Database(this.config.database, this.config.sequelizeOptions ? this.config.sequelizeOptions : {}); | ||
connectToDatabase: function(rawModels) { | ||
var db = Database(this.config.database, this.config.sequelizeOptions ? this.config.sequelizeOptions : {}); | ||
if(config.isPostGIS) { | ||
db.stop = db.sequelize.import('models/postgis/stop.js'); | ||
db.shape_gis = db.sequelize.import('models/postgis/shape_gis.js'); | ||
db.trip = db.sequelize.import('models/postgis/trip.js'); | ||
} | ||
return db; | ||
}, | ||
@@ -20,3 +26,3 @@ downloadGtfs: function(callback) { | ||
this.config.gtfsFilename, | ||
this.connectToDatabase(), | ||
this.connectToDatabase(true), | ||
config.isPostGIS, | ||
@@ -23,0 +29,0 @@ callback); |
{ | ||
"name": "gtfs-sequelize", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A model for the static GTFS using sequelize.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32269
953