mirror of
https://github.com/knex/knex.git
synced 2025-12-24 13:39:05 +00:00
Pool should be 1 for sqlite3 unless WAL is enabled
This commit is contained in:
parent
f4a6b4afa4
commit
2bc85cb7a5
@ -142,7 +142,7 @@ assign(Client.prototype, {
|
||||
initializePool: function(config) {
|
||||
this.connectionSettings = cloneDeep(config.connection)
|
||||
if (this.pool) this.destroy()
|
||||
this.pool = new this.Pool(assign(this.poolDefaults(config.pool), config.pool))
|
||||
this.pool = new this.Pool(assign(this.poolDefaults(config.pool || {}), config.pool))
|
||||
this.pool.on('error', function(err) {
|
||||
helpers.error('Pool2 - ' + err)
|
||||
})
|
||||
|
||||
@ -127,7 +127,14 @@ assign(Client_SQLite3.prototype, {
|
||||
default:
|
||||
return response;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
poolDefaults: function(config) {
|
||||
return assign(Client.prototype.poolDefaults.call(this, config), {
|
||||
min: 1,
|
||||
max: 1
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user