Skip to content

Allow parsing date and time types as JS Date #1650

@soedirgo

Description

@soedirgo

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 string which is indistinguishable from e.g. text columns
  • this client library, since we need to actually transform these columns to Date during JSON parsing

Requested in:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpostgrest-jsRelated to the postgrest-js library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions