Skip to content

v0.2.2

Compare
Choose a tag to compare
@CraZySacX CraZySacX released this 18 Mar 18:39
· 151 commits to master since this release

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