Custom Plugin to transform Alias.* to "Alias.Column1", "Alias.Column2", etc.
Hi everyone, in the previous question, I asked how to transform the following syntax into a new one. I was adviced to create my own plugin serializer (example: https://github.com/subframe7536/kysely-sqlite-tools/tree/master/packages/plugin-serialize). However, I still struggle with how to do it. Can anybody please give me a hint? I'll do it later by myself but need a guide how to start.
Thank you very much!
input syntax:
.SelectFrom('Table as Alias') .SelectAll('Alias')
.SelectFrom('Table as Alias') .SelectAll('Alias')
required result:
.SelectFrom('Table as Alias') .Select('Alias.Column1 as "Alias.Column1"') .Select('Alias.Column2 as "Alias.Column2"') ... all the rest columns in 'Alias' ...
.SelectFrom('Table as Alias') .Select('Alias.Column1 as "Alias.Column1"') .Select('Alias.Column2 as "Alias.Column2"') ... all the rest columns in 'Alias' ...
First came Kysely, the type-safe query builder for TypeScript, then came people asking questions, then came the Discord server.Join if you like Kysely or have questions, or both.