https://github.com/onebeyond/systemic-knex
A systemic Knex component
https://github.com/onebeyond/systemic-knex
knex systemic
Last synced: 12 months ago
JSON representation
A systemic Knex component
- Host: GitHub
- URL: https://github.com/onebeyond/systemic-knex
- Owner: onebeyond
- License: mit
- Created: 2021-02-15T11:53:37.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-12T03:50:04.000Z (almost 2 years ago)
- Last Synced: 2025-06-29T12:16:54.973Z (about 1 year ago)
- Topics: knex, systemic
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@onebeyond/systemic-knex
- Size: 666 KB
- Stars: 2
- Watchers: 7
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
systemic-knex
A systemic Knex component
## ☕️ Usage
```js
const System = require('systemic')
const knex = require('@onebeyond/systemic-knex')
new System()
.configure({
knex: {
// @SEE: http://knexjs.org/#Installation-client
client: 'mysql',
connection: {
host: 'localhost',
user: 'root',
password: 'password',
database: 'database_name'
},
// Optional Config (pool, migrations, seeds...):
pool: {},
migrations: {
tableName: 'knex_migrations',
directory: join(__dirname, '..', '/db/migrations')
},
seeds: {
directory: join(__dirname, '..', '/db/seeds')
}
}
})
.add('logger', console)
.add('knex', knex()).dependsOn('config')
.start((err, components) => {
// Do stuff with components.knex
})
```
### 🚩 Compatibility versions
| Version | Node.js | Knex |
|----------|:-------------:|------:|
| knex-systemic@1.0.0 | 10.x-14.x | 0.21.17 |
| knex-systemic@2.0.0 | 14.x-19.x | 0.21.17 |
| @onebeyond/knex-systemic@1.0.0 | 14.x-19.x | 0.21.17 |
| @onebeyond/knex-systemic@1.0.1 | 14.x-19.x | 0.21.17 |
| @onebeyond/knex-systemic@1.0.2 | 14.x-19.x | 0.21.18 |
| @onebeyond/knex-systemic@1.0.3 | 14.x-19.x | 0.21.19 |
| @onebeyond/knex-systemic@1.0.4 | 14.x-19.x | 0.21.21 |
| @onebeyond/knex-systemic@1.1.0 | 14.x-19.x | 0.95.10 |
| @onebeyond/knex-systemic@1.1.1 | 14.x-19.x | 0.95.11 |
| @onebeyond/knex-systemic@1.1.2 | 14.x-19.x | 0.95.12 |
| @onebeyond/knex-systemic@1.1.3 | 14.x-19.x | 0.95.13 |
| @onebeyond/knex-systemic@1.1.4 | 14.x-19.x | 0.95.14 |
| @onebeyond/knex-systemic@1.1.5 | 14.x-19.x | 0.95.15 |
| @onebeyond/knex-systemic@2.0.0 | 14.x-19.x | 1.0.0 |
| @onebeyond/knex-systemic@2.0.1 | 14.x-19.x | 1.0.1 |
| @onebeyond/knex-systemic@2.0.2 | 14.x-19.x | 1.0.2 |
| @onebeyond/knex-systemic@2.0.3 | 14.x-19.x | 1.0.3 |
| @onebeyond/knex-systemic@2.0.4 | 14.x-19.x | 1.0.4 |
| @onebeyond/knex-systemic@2.0.5 | 14.x-19.x | 1.0.5 |
| @onebeyond/knex-systemic@2.0.6 | 14.x-19.x | 1.0.6 |
| @onebeyond/knex-systemic@2.0.7 | 14.x-19.x | 1.0.7 |
| @onebeyond/knex-systemic@3.0.0 | 14.x-19.x | 2.0.0 |
| @onebeyond/knex-systemic@3.1.0 | 14.x-19.x | 2.1.0 |
| @onebeyond/knex-systemic@3.2.0 | 14.x-19.x | 2.2.0 |
| @onebeyond/knex-systemic@3.3.0 | 14.x-19.x | 2.3.0 |
| @onebeyond/knex-systemic@3.4.0 | 14.x-19.x | 2.4.0 |
| @onebeyond/knex-systemic@3.4.1 | 14.x-19.x | 2.4.1 |
| @onebeyond/knex-systemic@3.4.2 | 14.x-19.x | 2.4.2 |
| @onebeyond/knex-systemic@4.0.0 | 16.x-20.x | 2.4.2 |
| @onebeyond/knex-systemic@4.0.1 | 16.x-20.x | 2.5.0 |
| @onebeyond/knex-systemic@4.0.2 | 16.x-20.x | 2.5.1 |
| @onebeyond/knex-systemic@5.0.0 | 18.x-21.x | 3.0.0 |
### 📚 Parameters
Check out [the official documentation](http://knexjs.org/#Installation-client)