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

Cleaner cloner #2336

Merged
merged 10 commits into from
Feb 4, 2025
Merged

Cleaner cloner #2336

merged 10 commits into from
Feb 4, 2025

Conversation

benjie
Copy link
Member

@benjie benjie commented Jan 24, 2025

Description

PgSelectStep and PgUnionAllStep had ugly constructors that were overloaded to allow for cloning versus creating new steps. Horrible.

This PR creates new static clone methods instead, and refactors the constructor to be simpler.

This technically isn't a breaking change because people should not be constructing classes directly, they should be using the helper functions as detailed in the docs. And even if they are constructing the classes directly they shouldn't be using that for cloning.

Performance impact

Marginal?

Security impact

If there's bugs in this, the bugs could be unpleasant.

Checklist

  • My code matches the project's code style and yarn lint:fix passes.
  • I've added tests for the new feature, and yarn test passes.
  • I have detailed the new feature in the relevant documentation.
  • I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • If this is a breaking change I've explained why.

Copy link

changeset-bot bot commented Jan 24, 2025

🦋 Changeset detected

Latest commit: 5dc661e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@dataplan/pg Patch
graphile-build-pg Patch
graphile-utils Patch
pgl Patch
postgraphile Patch
graphile Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benjie benjie changed the base branch from main to pg-select-object January 24, 2025 17:12
Base automatically changed from pg-select-object to main February 4, 2025 17:28
@benjie benjie merged commit 22b3f05 into main Feb 4, 2025
42 checks passed
@benjie benjie deleted the cleaner-cloner branch February 4, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

1 participant