Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend type support for dates and timestamps #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ssedano
Copy link

@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
Author

ssedano commented Aug 17, 2021

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

@ghdna
Copy link
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
Author

ssedano commented Aug 18, 2021

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

@ssedano
Copy link
Author

ssedano commented Sep 23, 2021

Gentle reminder

@ghdna
Copy link
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