Skip to content

Add support for Common Table Expressions #179

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

Merged
merged 6 commits into from
Jun 8, 2024
Merged

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented Jun 7, 2024

These changes are now available in 3.31.0

CTEs (WITH clauses) are now supported by SELECT, INSERT, UPDATE, DELETE, and UNION queries, including subqueries. Test and docs coverage is 100%.

…ELETE, and UNION queries, including subqueries. Test and docs coverage is 100%.
@gwynne gwynne added enhancement New feature or request semver-minor Contains new APIs labels Jun 7, 2024
@gwynne gwynne requested review from 0xTim, MahdiBM and ptoffy June 7, 2024 17:03
Copy link

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (25d8170) to head (db4789b).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #179   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           98       100    +2     
  Lines         2565      2635   +70     
=========================================
+ Hits          2565      2635   +70     
Files Coverage Δ
...it/Builders/Implementations/SQLDeleteBuilder.swift 100.00% <100.00%> (ø)
...it/Builders/Implementations/SQLInsertBuilder.swift 100.00% <100.00%> (ø)
...Kit/Builders/Implementations/SQLUnionBuilder.swift 100.00% <100.00%> (ø)
...it/Builders/Implementations/SQLUpdateBuilder.swift 100.00% <100.00%> (ø)
...s/Prototypes/SQLCommonTableExpressionBuilder.swift 100.00% <100.00%> (ø)
...Builders/Prototypes/SQLSubqueryClauseBuilder.swift 100.00% <100.00%> (ø)
...Expressions/Clauses/SQLCommonTableExpression.swift 100.00% <100.00%> (ø)
Sources/SQLKit/Expressions/Queries/SQLDelete.swift 100.00% <100.00%> (ø)
Sources/SQLKit/Expressions/Queries/SQLInsert.swift 100.00% <100.00%> (ø)
Sources/SQLKit/Expressions/Queries/SQLSelect.swift 100.00% <100.00%> (ø)
... and 2 more

Copy link

@MahdiBM MahdiBM left a comment

Choose a reason for hiding this comment

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

I personally would have liked to have at least 1 test case with a real world complex query.

@gwynne
Copy link
Member Author

gwynne commented Jun 8, 2024

I personally would have liked to have at least 1 test case with a real world complex query.

There, happy? One of them even revealed a bug 😜

@gwynne gwynne requested a review from MahdiBM June 8, 2024 02:33
@gwynne gwynne merged commit 14f4350 into main Jun 8, 2024
@gwynne gwynne deleted the common-table-expressions branch June 8, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semver-minor Contains new APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants