27 lines
615 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function(client) {
var Pool = require('../../pool');
var inherits = require('inherits');
2014-04-16 01:23:50 -04:00
var _ = require('lodash');
// Inherit from the `Pool` constructor's prototype.
function Pool_SQLite3() {
2014-04-16 01:23:50 -04:00
this.client = client;
Pool.apply(this, arguments);
}
inherits(Pool_SQLite3, Pool);
2014-04-16 01:23:50 -04:00
Pool_SQLite3.prototype.defaults = function() {
return _.extend(Pool.prototype.defaults.call(this), {
max: 1,
min: 1,
destroy: function(client) { client.close(); }
});
};
2014-04-09 10:11:41 -04:00
// Assign the newly extended `Pool` constructor to the client object.
client.Pool = Pool_SQLite3;
};