Help with implementation of new dialect for snowflake
Hello,
I am trying to create a new dialect for snowflake, I am focusing on the query compiling part.
As I have read I saw that the snowflake dialect is supports standard SQL, however I don't know what does that mean when it comes to the
DefaultQueryCompiler
There are several things that snowflake does not support, such as indices.
Do I need to throw when there is a visitDropIndex
or visitDropIndex
?
Are there any other things I should look out for ?
What happens if I want to use function that are in snowflake, how do I acheive it ?Solution:Jump to solution
Hey 👋
We avoid throwing in such situations in the core, as a design decision. Kysely always outputs something - "Bring Your Own SQL Knowledge".
You can choose to throw in your compiler. It's perfectly fine!...
1 Reply
Solution
Hey 👋
We avoid throwing in such situations in the core, as a design decision. Kysely always outputs something - "Bring Your Own SQL Knowledge".
You can choose to throw in your compiler. It's perfectly fine!
We have
eb.fn<RT>(name, args)
and eb.fn.agg<RT>(name, args)
in case something is not built-in in Kysely's API (yet?). https://kysely-org.github.io/kysely-apidoc/interfaces/FunctionModule.html
You can write your own helpers for these Snowflake-specific functions. You have more context and can be more opinionated about the arguments' and returned types.