Kequc / knex-stringcase

Helper switches key case for npm knex
https://www.npmjs.com/package/knex-stringcase
ISC License
52 stars 8 forks source link

column name in camelCase doesn't work with knex pluck #23

Closed maxorcist closed 3 years ago

maxorcist commented 3 years ago

When plucking, snakecase vs camelcase returns different results: knex('tablename').pluck('user_id') > [2, 3] knex('tablename').pluck('userId') > [undefined, undefined]

Kequc commented 3 years ago

That's interesting, knex is not using wrapIdentifier in this function. Not to shirk responsibility but I suppose this should be an issue directed at the knex library, as there's nothing I can do about it.

maxorcist commented 3 years ago

Ah! Alright, thank you for the answer.