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

fix(Postgres Node): Always return TIMESTAMP and TIMESTAMPZ as ISO string #6145

Merged
merged 2 commits into from
May 4, 2023

Conversation

OlegIvaniv
Copy link
Contributor

@OlegIvaniv OlegIvaniv commented May 1, 2023

In this Pull Request, I have introduced an updated version of the Postgres node to ensure that TIMESTAMP and TIMESTAMPZ values are parsed as ISO strings instead of Datetime objects. In the previous implementation (v2), these values were treated as Datetime objects on the backend, allowing for the use of standard date expression methods. However, once serialized and transmitted to the frontend via EventSource, these values were converted to ISO strings. As a result, only string methods were available.

Github issue / Community forum post (link here to close automatically):

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2023

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Files matching packages/nodes-base/nodes/**:

  • Added workflow tests for nodes if possible.

Make sure to check off this list before asking for review.

@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (14f7114) 19.42% compared to head (acd0a75) 19.42%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6145      +/-   ##
==========================================
- Coverage   19.42%   19.42%   -0.01%     
==========================================
  Files        2590     2590              
  Lines      117095   117103       +8     
  Branches    18381    18383       +2     
==========================================
  Hits        22744    22744              
- Misses      93686    93694       +8     
  Partials      665      665              
Impacted Files Coverage Δ
...ackages/nodes-base/nodes/Postgres/Postgres.node.ts 0.00% <ø> (ø)
...ges/nodes-base/nodes/Postgres/v2/actions/router.ts 0.00% <0.00%> (ø)
...se/nodes/Postgres/v2/actions/versionDescription.ts 0.00% <ø> (ø)
...nodes-base/nodes/Postgres/v2/methods/listSearch.ts 0.00% <0.00%> (ø)
...odes-base/nodes/Postgres/v2/methods/loadOptions.ts 0.00% <0.00%> (ø)
...es/nodes-base/nodes/Postgres/v2/transport/index.ts 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request node/new Creation of an entirely new node labels May 1, 2023
@OlegIvaniv OlegIvaniv force-pushed the ado-629-bug-luxons-torelative-function-doesnt branch from c64ff9e to 9760119 Compare May 1, 2023 13:31
Copy link
Contributor

@agobrech agobrech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2023

✅ All Cypress E2E specs passed

@OlegIvaniv OlegIvaniv merged commit 0eb4d9f into master May 4, 2023
@OlegIvaniv OlegIvaniv deleted the ado-629-bug-luxons-torelative-function-doesnt branch May 4, 2023 15:25
MiloradFilipovic added a commit that referenced this pull request May 5, 2023
* master: (110 commits)
  fix(editor): Update and add design system checkbox component to Editor (#6178)
  fix(editor): Display SSO entry in Settings on Cloud (#6181)
  feat(Code Node): Add Python support (#4295)
  fix(editor): Update and fix storybook (was failing to run in local dev mode) (#6180)
  feat(Kafka Trigger Node): Add non-parallel execution (#6175)
  fix(Postgres Node): Always return TIMESTAMP and TIMESTAMPZ as ISO string (#6145)
  fix: Revert change that hid the SSH private key (no-changelog) (#6158)
  fix(Google Sheets Node): Upgrade xlsx to address CVE-2023-30533 (#6172)
  fix(editor): Show the correct actions count in the nodes list (#6183)
  ci: Revert full db reset for e2e (no-changelog) (#6182)
  fix(AWS Rekognition Node): Fix all different action type (#6136)
  feat(Airtable Node): Access token support (#6160)
  fix(editor): Remove duplicate mapping of `item.json` key in data pinning (#6135)
  fix(HTTP Request Node): Correctly doesn't redirect on non GET method (#6132)
  fix(MySQL Node): Node should return date types as strings (#6169)
  feat(JotForm Trigger Node): Add support for hipaa-api.jotform.com (#6171)
  🚀 Release 0.227.0 (#6167)
  fix(editor): Flag issues only on workflow activation (#6127)
  fix(editor): Faster reconnects for push (no-changelog) (#6164)
  fix: Log unhandled errors during license activation (no-changelog) (#6165)
  ...

# Conflicts:
#	packages/editor-ui/src/mixins/workflowHelpers.ts
#	packages/editor-ui/src/views/NodeView.vue
netroy pushed a commit that referenced this pull request May 15, 2023
…ing (#6145)

* fix(Postgres Node): Always return TIMESTAMP and TIMESTAMPZ as ISO string

* Fix linting issues
@janober
Copy link
Member

janober commented May 25, 2023

Got released with n8n@0.228.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team node/improvement New feature or request node/new Creation of an entirely new node Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants