cmeeren / Facil

Facil generates F# data access source code from SQL queries and stored procedures. Optimized for developer happiness.
MIT License
140 stars 7 forks source link

Allow the customization of the F# records/field names #26

Closed costa100 closed 2 years ago

costa100 commented 2 years ago

Hello,

Sometimes, we have to deal with existing databases that have been developed by other people/projects. In general, more likely there is inconsistency between naming conventions. Some people use pascal case, other use a c style naming conventions (first_name, last_name). It would be nice if Facil offers the option of specifying a naming conversion scheme when generating the F# records. It would be best if the naming convention can be specified, per connection, per sets of objects selected through the include/exclude options down to the column.

Possible options: AsIs, PascalCase, CStyle, CamelCase ( not sure about this one). Example: Database: first_name AsIs: first_name PascalCase: FirstName CStyle: first_name CamelCase: firstName

I am not sure if we need to go as far as specifying Plural or Singular.

In addition to this, it might be nice to offer the option of overriding the name of a record regardless of the conversion scheme.

What do you think?

cmeeren commented 2 years ago

Thank you for the feature request. I consider it in-scope for Facil. However, for the reasons below, I'm going to give this a pass, at least for the foreseeable future:

Closing this for now. Feel free to continue the discussion if you strongly disagree.