https://github.com/lucid-services/serviser-knex
Integrates Knex sql query builder with serviser based services
https://github.com/lucid-services/serviser-knex
knexjs serviser
Last synced: about 1 year ago
JSON representation
Integrates Knex sql query builder with serviser based services
- Host: GitHub
- URL: https://github.com/lucid-services/serviser-knex
- Owner: lucid-services
- License: gpl-3.0
- Created: 2019-02-07T09:02:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T04:18:31.000Z (over 3 years ago)
- Last Synced: 2025-02-14T22:23:56.241Z (over 1 year ago)
- Topics: knexjs, serviser
- Language: JavaScript
- Homepage:
- Size: 123 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/lucid-services/serviser-knex) [](https://www.npmjs.com/package/serviser-knex)
[serviser](https://github.com/lucid-services/serviser) plugin which integrates [Knex](https://github.com/tgriesser/knex)
```javascript
const Service = require('serviser');
const config = require('serviser-config');
const knexBuilder = require('serviser-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:
----------------------------------------
```javascript
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:
---------------------
```bash
> export SQL_DEBUG=1
> npm start
```
Tests
-----
> npm test