prorm API Reference
    Preparing search index...

    Function buildCreateDomainSQL

    • Create a domain — a named type carrying its own constraints.

      await qi.createDomain('email', { as: 'text', check: "VALUE ~ '@'" });
      

      The point of a domain over a CHECK on each column is that the rule is declared once and every column of that domain inherits it.

      Parameters

      • name: string
      • options: DomainOptions
      • dialect: string
      • quoteTable: (t: string) => string
      • quoteId: (id: string) => string
      • escape: (value: unknown) => string

      Returns string