Skip to content

Knexjs - convert snake_case column names to camelCase on query and the reverse when using parameters

License

Notifications You must be signed in to change notification settings

mkhanal/knex-case-converter-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

knex-case-converter-plugin

Build Status Coverage Downloads Downloads npm version dependencies dev dependencies License

convert snake_case column names to camelCase on query and the reverse when using parameters

Getting Started

Install it via npm:

npm install knex-case-converter-plugin

Or Yarn it:

yarn add knex-case-converter-plugin

And include in your project:

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

About

Knexjs - convert snake_case column names to camelCase on query and the reverse when using parameters

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published