fix(driver): return Object for JSON columns and imply UTC for timestampz #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR does a couple of things:
yarn.lock
file and references toyarn
in thepackage.json
scripts because this usespnpm
for the GitHub actions and everything elseDataApiConnection.executeQuery
logic to be more type-savvy in the following ways:date
timestamp
andtimestamptz
columns intoDate
objects. However, in Postgres,timestamptz
columns are always stored in UTC and are converted to the system timezone upon retrieval. Therefore, implied UTC needs to be added to ensure that theDate
object is correct Timestamp columns and Date values #34json
andjsonb
columns. This relieves us of needing to use theParseJSONResultsPlugin
which incorrectly and eagerly convert non-JSON column types into JSON. Given that the column type is available here, I think it makes a lot of sense to use that informationGiven that this changes the return types, I've opted for a major version bump.