bi-service-knex
v1.0.0
Published
integrates knex SQL query builder with bi-service based projects
Downloads
3
Maintainers
Readme
bi-service plugin which integrates Knex
const Service = require('bi-service');
const config = require('bi-config');
const knexBuilder = require('bi-service-knex');
const knex = knexBuilder({/*knex options*/});
const service = new Service(config);
//enables integrity inspection features
service.resourceManager.register('postgres', knex);
Define minimum required db server version:
const knex = knexBuilder({
client: 'postgres',
version: '10.5.0'
});
if the defined version requirement isn't satisfied, the service initialization process will fail with an error.
SQL query debugging:
> export SQL_DEBUG=1
> npm start
Tests
npm test