Skip to content

Extend type support for dates and timestamps#67

Open
ssedano wants to merge 1 commit into
ghdna:masterfrom
ssedano:master
Open

Extend type support for dates and timestamps#67
ssedano wants to merge 1 commit into
ghdna:masterfrom
ssedano:master

Conversation

@ssedano
Copy link
Copy Markdown

@ssedano ssedano commented Aug 2, 2021

Optionally (defaults to false) cast date, timestamp, and timestamp with
time zone data types to JS Date objects. Query method doesn't expose the
data type forcing developers that want to operate with Date objects to
track which columns are dates and perform the cast themselves.

Dates and timestamps are casted to JS Date types using Luxon library.
The code uses the method to transform SQL formats, consistent with
Presto/Trino documentation.

The code uses Luxon, and as such, it requires ICU full extension to
work. ICU full mode is available by default starting on Node v13, but
needs to be configured for previous versions of Node.

Resolves #49

@ssedano
Copy link
Copy Markdown
Author

ssedano commented Aug 17, 2021

@ghdna Any chance I can get this reviewed, please? Thank you!

@ghdna
Copy link
Copy Markdown
Owner

ghdna commented Aug 17, 2021

Yes, will check it out this weekend.

Optionally (defaults to false) cast date, timestamp, and timestamp with
time zone data types to JS Date objects. Query method doesn't expose the
data type forcing developers that want to operate with Date objects to
track which columns are dates and perform the cast themselves.

Dates and timestamps are  casted to JS Date types using Luxon library.
The code uses the method to transform SQL formats, consistent with
Presto/Trino documentation.

The code uses Luxon, and as such, it requires ICU full extension to
work. ICU full mode is available by default starting on Node v13, but
needs to be configured for previous versions of Node.
@ssedano
Copy link
Copy Markdown
Author

ssedano commented Aug 18, 2021

Included the dependencies in package-lock.json (all are scoped to development)

@ssedano
Copy link
Copy Markdown
Author

ssedano commented Sep 23, 2021

Gentle reminder

@ghdna
Copy link
Copy Markdown
Owner

ghdna commented Jan 17, 2022

Can we do this without adding another library as dependency? It increases maintenance down the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend data types support for UTC dates, i.e. Timestamp Athena type

2 participants