pgtyped icon indicating copy to clipboard operation
pgtyped copied to clipboard

Please clarify experimental camelCaseColumnNames use case

Open benjamin-thomas opened this issue 4 years ago • 2 comments

Hello,

Great library :)

Could you please have a look at my git commit (and the comment at the end).

https://github.com/benjamin-thomas/ng-reminders/commit/1fb6fd1f4a0f6529a78ab44c0566cf0552380604

I'm not sure if I understand what this flag is meant to do, or if I'm facing a bug.

In short, my generated interface field is properly camel cased if I use this flag. However the "retrieved" value happens to be undefined

Previous mentions of the config option here:

  • https://github.com/adelsz/pgtyped/issues/199
  • https://github.com/adelsz/pgtyped/issues/107
  • https://github.com/adelsz/pgtyped/pull/110

I hope I made things clear enough in my commit's comment.

Thanks

benjamin-thomas avatar Dec 04 '20 07:12 benjamin-thomas

+1 Yes this is very confusing at the moment. So it seems that you only want to use this setting if you have an existing process that is camel casing your data.

I think most people are assuming that this setting will camel case data as well as types. I certainly was.

tim-field avatar Jun 15 '21 22:06 tim-field

Does the author intend to include the transformation in this library? @adelsz

If you don't mind I can create a PR.

wongjiahau avatar Aug 30 '21 09:08 wongjiahau

Runtime transformations are planned but are not there yet. Added section clarifying the compile-time only nature of camelCaseColumnNames to docs.

adelsz avatar Jan 28 '23 16:01 adelsz