Skip to content

Support domain types #149

Open
Open
@veyndan

Description

@veyndan

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions