demetrixbio / FSharp.Data.Npgsql

F# type providers to support statically typed access to input parameters and result set of sql statement in idiomatic F# way. Data modifications via statically typed tables.
Apache License 2.0
127 stars 16 forks source link

Suggestion: Add a static parameter specifying which methods should be generated #62

Closed kerams closed 2 years ago

kerams commented 4 years ago

I think it would be very rare for someone to use both Execute and AsyncExecute, so half the methods pretty much never see any action, yet their generation takes a toll (probably not a huge one though) on the design-time experience.

Therefore I propose we add a flags enum parameter to both NpgsqlCommand and NpgsqlConnection that would allow the user to choose which combination of methods they need. It would also come in handy should Task returning methods ever be supported.

Swoorup commented 4 years ago

Agree with this, it has always been one or the other in my projects. Will the generated methods have the same name?

kerams commented 4 years ago

I'd be against it. If nothing else, the names should at least stay consistent.