https://github.com/mkhanal/knex-case-converter-plugin
Knexjs - convert snake_case column names to camelCase on query and the reverse when using parameters
https://github.com/mkhanal/knex-case-converter-plugin
case-conversion case-converter database knexjs nodejs
Last synced: 6 months ago
JSON representation
Knexjs - convert snake_case column names to camelCase on query and the reverse when using parameters
- Host: GitHub
- URL: https://github.com/mkhanal/knex-case-converter-plugin
- Owner: mkhanal
- License: gpl-3.0
- Created: 2018-04-22T12:53:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-18T13:09:30.000Z (over 3 years ago)
- Last Synced: 2025-10-03T10:33:45.489Z (9 months ago)
- Topics: case-conversion, case-converter, database, knexjs, nodejs
- Language: JavaScript
- Size: 167 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# knex-case-converter-plugin








convert snake_case column names to camelCase on query and the reverse when using parameters
## Getting Started
Install it via npm:
```shell
npm install knex-case-converter-plugin
```
Or Yarn it:
```shell
yarn add knex-case-converter-plugin
```
And include in your project:
```javascript
import plugin from 'knex-case-converter-plugin';
//sample
let knexConfig = {
"client": "mysql2",
"debug": true,
"connection": {
"host": "localhost",
"user": "root",
"password": "root",
"database": "db_test"
}
}
Object.assign(knexConfig, plugin)
// OR
//knexConfig.wrapIdentifier = plugin.wrapIdentifier;
//knexConfig.postProcessResponse = plugin.postProcessResponse;
```
## License
GPL-3.0