Kenneth
Access column type in custom plugin
Hey!
We would like to access the column type in one of my custom Kysely plugins.
The AST does not seem to know the column type in the
transformQuery
method.
Is there a way to access the column types within our plugin?
Our ultimate goal would be to convert ISO8601 strings into JavaScript Date
s. The used dialect (kysely-data-api
) is not doing that out-of-the-box. It seems a common way to do this would be to use a regex for an ISO8601 compatible string, but as this would not consider the timestamp
column type, we may transform strings that should rather not be transformed.
Any ideas would be appreciated 🙏
Thank you!9 replies