sqldelight / sqldelight/sql-psi
Support domain types
Open
Nobody has claimed this yet.
postgresql
- Dominant language
- Kotlin
- Stars
- 104
- Forks
- 35
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 14
Description
Dialect: PostgreSQL
https://www.postgresql.org/docs/12/domains.html
Example
CREATE DOMAIN http_url AS TEXT
DEFAULT 'https://example.com'
NOT NULL
CHECK ( VALUE != '' );
CREATE TABLE page_rank (
url http_url,
rank INT NOT NULL
)
Side Note
This could lead to defining the Kotlin type in SQLDelight's .sq file more succinctly. For example:
CREATE DOMAIN http_url AS TEXT AS okhttp3.HttpUrl
I'll create a separate issue in SQLDelight when this issue is implemented.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PostgreSQL 12 domains documentation and the CREATE DOMAIN example in the issue, then inspect how SQLDelight .sq declarations represent database types. Done means the example domain and its use in CREATE TABLE are accepted; the proposed Kotlin type syntax is noted as a separate follow-up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, postgresql
- Domain
- databases, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100