Type mapping
How does no-orm map Postgres data types into Typescript types?
Mapping philosophy
Section titled “Mapping philosophy”This project tries to make sensible decisions about type mapping.
For example, a Postgres TIMESTAMPTZ type is has a microsecond precision whereas a Javascript Date object is only precise to the millisecond. Despite this, no-orm will map a TIMESTAMPTZ type to a Javascript Date object as an opinionated decision favouring practicality.
A full list of mappings
Section titled “A full list of mappings”We won’t duplicate decisions made about every type in these docs. Instead, refer to the no-orm source code. The mappings test here will always show the current behaviour of how no-orm maps types.
We will however document how no-orm behaves with more complex data types.