Closed RobinClowers closed 2 months ago
@RobinBlomberg any chance I can get your eyes on this? I'd like to start this work soon, and I would feel a lot better about it if you were onboard with the general idea, even if we still need to iron out the details a bit.
FYI I'm planning to implement this and open a PR, though I may not get to it for a few weeks.
The project I use Kysely with has two main schemas, and objects are promoted from one to the other from time to time. Currently to support both versions, we have to add conditionals to our code to swap the fully qualified names based on version information from our backend system. Since our backend guarantees that names are unique across these two schemas, we could set our search path to contain both, and just reference the relations by unqualified name.
I see there is already some precedent for this with https://github.com/RobinBlomberg/kysely-codegen/pull/56. I'm curious what you think about take this further to accept multiple schemas? The obvious thing would be allow the flag to be specified multiple times, but I'm open to a more explicit api.
Upvote & Fund