griffio / sqldelight-custom-dialect

sqldelight with custom dialect module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SqlDelight 2.0.1 with Custom Dialect

A custom dialect can be needed if you want to extend a vendor dialect, like PostgreSql, with functions and types that are not currently defined. This maybe because they belong to an optional extension that you want to use.

Example PostgreSql extensions introduce functions that are not currently supported by SqlDelight.

A new type resolver is needed https://github.com/griffio/sqldelight-custom-dialect/blob/master/customDialect/src/main/kotlin/griffio/dialect/CustomDialect.kt#L15

pg_trgm module 

similarity ( text, text ) → real

word_similarity ( text, text ) → real

strict_word_similarity ( text, text ) → real

About

sqldelight with custom dialect module


Languages

Language:Kotlin 100.0%