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

Open
wants to merge 10 commits into
base: pg-select-object
Choose a base branch
from
Open

Cleaner cloner #2336

wants to merge 10 commits into from

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: 0b4c4cd

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

This PR includes changesets to release 15 packages
Name Type
@dataplan/pg Patch
postgraphile Patch
grafast Patch
graphile-build-pg Patch
graphile-utils Patch
pgl Patch
graphile Patch
@localrepo/grafast-bench Patch
@dataplan/json Patch
@grafserv/persisted Patch
grafserv Patch
ruru-components Patch
@localrepo/grafast-website Patch
graphile-build Patch
graphile-export 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🌳 Triage
Development

Successfully merging this pull request may close these issues.

1 participant