circuithub / rel8

Hey! Hey! Can u rel8?
https://rel8.readthedocs.io
Other
150 stars 38 forks source link

Expand use of `QualifiedName` to types, composites, enums #263

Closed shane-circuithub closed 11 months ago

shane-circuithub commented 11 months ago

Types in PostgreSQL can also be qualified with a schema. However, it's not sufficient to just change the type of TypeInformation's typeName to QualifiedName, because a type isn't just a name. Postgres types can also be parameterised by modifiers (e.g., numeric(7, 2)) and array types of arbitrary depth (e.g., int4[][]).

To accomodate this, a new type is introduced, TypeName. Like QualifiedName, it has an IsString instance, so the common case (schema set to Nothing, no modifiers, scalar type) will continue working as before.