Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/griffio/sqldelight-custom-dialect
sqldelight with custom dialect module
https://github.com/griffio/sqldelight-custom-dialect
postgresql sqldelight
Last synced: 8 days ago
JSON representation
sqldelight with custom dialect module
- Host: GitHub
- URL: https://github.com/griffio/sqldelight-custom-dialect
- Owner: griffio
- Created: 2024-01-15T19:52:38.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-07-17T08:37:29.000Z (4 months ago)
- Last Synced: 2024-07-17T10:48:13.892Z (4 months ago)
- Topics: postgresql, sqldelight
- Language: Kotlin
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SqlDelight 2.0.2 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
```
Some functions we want to use:pg_trgm extension
similarity ( text, text ) → real
word_similarity ( text, text ) → real
strict_word_similarity ( text, text ) → real
pgcrypto extension
crypt(text, text) -> text
gen_salt(text, int) -> text
```
* `CREATE EXTENSION IF NOT EXISTS` supported in `.sq` and `.sqm`
* MERGED - https://github.com/cashapp/sqldelight/pull/4541
* Function parameters cannot mix types - Only the return type can be specified
* AWAITING FIX https://github.com/cashapp/sqldelight/issues/4133