Request: Database schema specific extensions?
Would it be possible/feasible to allow for schema specific extensions?
There are certain operations I perform on some databases regularly and want to do and it involves doing complex joins, matching to specific ids, etc. The only way I could make these shareable would be to save it in a query, and copy to a new query or only use on connections with similar schemas.
The best I could do is place the shareable code into another query and #load
it into my new queries and it appears to work. But could be a problem if running on a similar query but different database (e.g., dev vs prod). Though the warning makes it seem like it could become a problem for some unforseen reason.
Ideally it would be automatically available the same way MyExtensions
works, but based on connection to a database and schema. It would be nice if there was ways to customize how the schemas are generated (I think this has been requested before) to allow us to do things like applying interfaces/base types to the generated code, change mappings, etc. That could make this doable then since we could create extensions on the interfaces we apply.