cornucopia
cornucopia copied to clipboard
Add support for type mapping
Similar to Kanel's customTypeMap.
One use case for this is allowing one to treat PG extension types as some other types that they behave as (e.g., map public.ulid to String).
This allows treating a type as some custom type, requiring the user to implement ToSql
, FromSql
, and a XxxBorrowed
variant on it. Additionally, we treat mapping to String
as a special case.
This is a POC for #246. Happy to improve the PR and add tests if the direction sounds good.