How to plugin column aliases with table prefix?
I am not familiar with kysely plugin creation. I am also not sure if my issue can be done with such a plugin. My aim is to have overload method like this:
so the resulted query will be:
would it be possible with plugins or any other (even existing) solution in kysely?
Thank you
4 Replies
It's not possible to overload methods using plugins. It's very difficult to overload Kysely methods using any technique. It's better to keep kysely as just a query builder and build an abstraction layer on top of it.
but how would you suggest to do it as abstraction layer on top of it? use some crazy-name alias and post progress regex string replacement?
and if this is not possible. is it worth to create an issue for this as a requested new feature?
Not worth opening an issue. Kysely is not designed to be extendable. You should use it as a dumb query builder and not try to turn it into an ORM.
ok