β‘ Feature Request
Allow replacing null values in postgres responses with undefined.
π£οΈ Discussion
- The types generated by this package union
null with the field's primitive type
- The results returned from queries have concrete
null values (matching the declared types)
However, inside our application we rarely desire null, and have to manually omit it with extra deserialization code.
This deserialization code ends up mirroring much of the schema shape, diminishing the benefit of using the generated types.
We thread data through different systems, ensuring their types conform at each technology boundary (eg; Postgres-to-OpenAPI Response), and being able to hand them around without massaging makes all of us much happier. π
β Precedent
Many packages already provide hooks for selectively-transforming their output, either at types-generation time, or at run time.
atdatabases is uniquely situated to provide a comprehensive solution here, comprising both types-generation time and run time components.
An API allowing us to hook into both of these components to coerce data into the shapes we need would be super useful! βοΈ
β‘ Feature Request
Allow replacing
nullvalues in postgres responses withundefined.π£οΈ Discussion
nullwith the field's primitive typenullvalues (matching the declared types)However, inside our application we rarely desire
null, and have to manually omit it with extra deserialization code.This deserialization code ends up mirroring much of the schema shape, diminishing the benefit of using the generated types.
We thread data through different systems, ensuring their types conform at each technology boundary (eg; Postgres-to-OpenAPI Response), and being able to hand them around without massaging makes all of us much happier. π
β Precedent
Many packages already provide hooks for selectively-transforming their output, either at types-generation time, or at run time.
atdatabases is uniquely situated to provide a comprehensive solution here, comprising both types-generation time and run time components.
An API allowing us to hook into both of these components to coerce data into the shapes we need would be super useful! βοΈ