Create a domain — a named type carrying its own constraints.
await qi.createDomain('email', { as: 'text', check: "VALUE ~ '@'" }); Copy
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.
CHECK
Create a domain — a named type carrying its own constraints.
The point of a domain over a
CHECKon each column is that the rule is declared once and every column of that domain inherits it.