mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-31 23:49:28 +00:00
feat(Postgres): support nested domain types (#3641)
* feat(Postgres): support nested domain types * chore: clippy * fix(postgres): Recurse when looking for type info.
This commit is contained in:
@@ -68,3 +68,16 @@ CREATE TABLE circles (
|
||||
c circle,
|
||||
EXCLUDE USING gist (c WITH &&)
|
||||
);
|
||||
|
||||
CREATE DOMAIN positive_int AS integer CHECK (VALUE >= 0);
|
||||
CREATE DOMAIN percentage AS positive_int CHECK (VALUE <= 100);
|
||||
|
||||
CREATE TYPE person as (
|
||||
id int,
|
||||
age positive_int,
|
||||
percent percentage
|
||||
);
|
||||
|
||||
CREATE TYPE leaf_composite AS (prim integer);
|
||||
CREATE DOMAIN domain AS leaf_composite;
|
||||
CREATE TYPE root_composite AS (domain domain);
|
||||
|
||||
Reference in New Issue
Block a user