Comments (5)
Yeah... I think that method that caches DB table names should disable mappers, because it does queries to databases internal tables. The same way that inside knex in migrations mappers are ignored when queries to knex internal tables are made.
As a side note, I think it is a bad idea to use those mappers. They will just increase probability that something in knex/objection/knde-db-manager etc. libraries break and doesn't really give any benefit for developer. Camel / pascal case in db column names are not so hard to manage when you get used to it and saves one from many potentially really hard to debug problems.
from knex-db-manager.
Thanks for the response, @elhigu!
should disable mappers
What do you mean by this? Something like this? https://github.com/knex/knex/blob/master/lib/migrate/Migrator.js#L38
As a side note, I think it is a bad idea to use those mappers.
I agree with this, but for my small project, it has become such a hassle to serialize data to camelCase before sending it out to the UI, which "feels" better to use.
I'll keep your opinion in the back of my head and refactor when I can, thanks again!
from knex-db-manager.
should disable mappers
Oops, I meant this: https://github.com/knex/knex/blob/37d9c3034743705782dce42355abd3df4f0ebf84/lib/util/make-knex.js#L177
from knex-db-manager.
Yep, something like that should do. I'm not sure if actually ew should add some method to knex for allowing to disable them, just for single query... Or maybe knex-db-manager could create another instance of knex using the same pool, but without those snake case wrapper configs. Though I'm not sure if that feature allows to override those configs.
from knex-db-manager.
Alrighty, thanks @elhigu !
I'll try making a PR for this over the weekend 👍
from knex-db-manager.
Related Issues (20)
- An in-range update of coveralls is breaking the build 🚨 HOT 1
- populateDb expects seed files that export a function, but knex seed files exports.seed HOT 6
- An in-range update of mocha is breaking the build 🚨 HOT 4
- An in-range update of knex is breaking the build 🚨 HOT 2
- An in-range update of mysql is breaking the build 🚨 HOT 1
- No information on collation / charset HOT 5
- An in-range update of pg is breaking the build 🚨 HOT 13
- An in-range update of knex is breaking the build 🚨 HOT 1
- An in-range update of coveralls is breaking the build 🚨 HOT 4
- dbManager.createDb > Warning: a promise was rejected with a non-error: [object Undefined] HOT 9
- SSL Not supported - Postgres HOT 1
- The encoding/charset is hard coded to 'utf8' HOT 1
- databaseManagerFactory doesn't work when the Knex config uses a database URL as the connection property HOT 6
- truncateDb does not work on macOS HOT 2
- Support for UNIX sockets HOT 1
- MSSQL support HOT 1
- knex timeout on migrateDb() call HOT 1
- dbManager.truncateDb - cannot truncate a table referenced in a foreign key constraint HOT 1
- Update knex dependency HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knex-db-manager.