不要怂,就是干,撸起袖子干!

Commit 9a0b38ac by Mick Hansen

connection strings: use pathname instead of path (dont use query strings in db name)

1 parent 78f218ef
Showing with 5 additions and 2 deletions
......@@ -59,8 +59,8 @@ module.exports = (function() {
urlParts = url.parse(arguments[0])
// SQLite don't have DB in connection url
if (urlParts.path) {
database = urlParts.path.replace(/^\//, '')
if (urlParts.pathname) {
database = urlParts.pathname.replace(/^\//, '')
}
dialect = urlParts.protocol
......
......@@ -48,6 +48,9 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
it('should work with connection strings (2)', function () {
var sequelize = new Sequelize('sqlite://test.sqlite/')
})
it('should work with connection strings (3)', function () {
var sequelize = new Sequelize('sqlite://test.sqlite/lol?reconnect=true')
})
}
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!