Skip to content

Support for domains #16

@NBprojekt

Description

@NBprojekt

In my database I use custom domain like:

Create Domain email As text;
Create Domain phone_number As varChar(16);

Currently when I generate the types, it seams to work in general but fails for arrays.

In this example all columns are from type email or email[]

SQL
Create Table private.email (
  email_from                    email           not null,
  email_reply_to               email               null,
  email_to                      email[]         not null,
  email_cc                      email[]             null,
  email_bcc                     email[]             null,

TS
export type PrivateEmail = {
  from: string; 
  reply_to: string | null;
  to: unknown[];
  cc: unknown[] | null;

In my opinion, it would be a nice addition if the domain got its own type.
e.g.

SQL
Create Domain email As text;

TS
export type email = string;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions