cornucopia icon indicating copy to clipboard operation
cornucopia copied to clipboard

Add support for type mapping

Open duarten opened this issue 7 months ago • 0 comments

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.

duarten avatar Jul 17 '24 16:07 duarten