Skip to content

Add support for Common Table Expressions#179

Merged
gwynne merged 6 commits into
mainfrom
common-table-expressions
Jun 8, 2024
Merged

Add support for Common Table Expressions#179
gwynne merged 6 commits into
mainfrom
common-table-expressions

Conversation

@gwynne

@gwynne gwynne commented Jun 7, 2024

Copy link
Copy Markdown
Member

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
@codecov

codecov Bot commented Jun 7, 2024

Copy link
Copy Markdown

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

@MahdiBM MahdiBM left a comment

Copy link
Copy Markdown

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.

Comment thread Tests/SQLKitTests/SQLCommonTableExpressionTests.swift
@gwynne

gwynne commented Jun 8, 2024

Copy link
Copy Markdown
Member Author

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