v0.2.2
New Features
- Added support for connections keepalive.
- Added initial support for winston logging.
Keepalive is disabled by default. Logging is set to info. To adjust, add the following to your configuration:
new jdbc({
url: 'jdbc:mysql://mydbhost/thedb',
minpoolsize: 5,
maxpoolsize: 10,
properties: {
user: 'user',
password: 'password'
},
keepalive: {
interval: 120000,
query: 'select 1',
enabled: true
},
logging: {
level: 'debug'
}
})
keepalive properties
- interval: How often to issue the keepalive query in ms.
- query: The query to use. Make sure this is a cheap to run query. Every open connection will run it.
- enabled: true or false