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

Add classes to represent CTEs #1462

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Add classes to represent CTEs #1462

merged 3 commits into from
Oct 24, 2024

Conversation

plypaul
Copy link
Contributor

@plypaul plypaul commented Oct 15, 2024

  • This PR adds classes to represent CTEs to the SQL object model.
  • CTEs will be used in later PRs to simplify generated queries.
  • Functionality to render CTEs is included, and existing code should not hit the CTE use cases so many methods were left unimplemented.

@cla-bot cla-bot bot added the cla:yes label Oct 15, 2024
@plypaul plypaul changed the title Add Classes to Represent CTEs Add classes to represent CTEs Oct 15, 2024
@plypaul plypaul force-pushed the p--cte--04 branch 2 times, most recently from 574c536 to 8553a29 Compare October 15, 2024 19:00
@plypaul plypaul marked this pull request as ready for review October 15, 2024 19:07
@@ -78,6 +78,7 @@ class StaticIdPrefix(IdPrefix, Enum, metaclass=EnumMetaClassHelper):
SQL_PLAN_TABLE_FROM_CLAUSE_ID_PREFIX = "tfc"
SQL_PLAN_QUERY_FROM_CLAUSE_ID_PREFIX = "qfc"
SQL_PLAN_CREATE_TABLE_AS_ID_PREFIX = "cta"
SQL_PLAN_COMMON_TABLE_EXPRESSION_ID_PREFIX = "cta"
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a dupe of the one above, did you mean cte?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Updated.

Copy link
Contributor

@WilliamDee WilliamDee left a comment

Choose a reason for hiding this comment

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

oops, misclicked the approve

@plypaul plypaul requested a review from WilliamDee October 15, 2024 19:31
Base automatically changed from p--cte--03 to main October 21, 2024 19:24
@plypaul plypaul merged commit 85dac0f into main Oct 24, 2024
15 checks passed
@plypaul plypaul deleted the p--cte--04 branch October 24, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants