pgtyped
pgtyped copied to clipboard
Please clarify experimental camelCaseColumnNames use case
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
+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.
Does the author intend to include the transformation in this library? @adelsz
If you don't mind I can create a PR.
Runtime transformations are planned but are not there yet.
Added section clarifying the compile-time only nature of camelCaseColumnNames to docs.