postgrest-js
postgrest-js copied to clipboard
Allow parsing date and time types as JS `Date`
PostgREST returns date & time types as a JSON string (and will continue to do so, since there's no native date/time type in JSON).
However, we can modify the JSON parsing such that date & time columns are returned as JS Date for ease of use.
This will require changes in:
- the generated types, since we need to know which columns have a date/time type - currently they're generated as
stringwhich is indistinguishable from e.g.textcolumns - this client library, since we need to actually transform these columns to
Dateduring JSON parsing
Requested in:
- https://github.com/supabase/postgrest-js/pull/233
- https://github.com/supabase/supabase-js/issues/1267
- https://github.com/supabase/postgres-meta/issues/822