Skip to content

Conversation

@Baptouuuu
Copy link
Member

@Baptouuuu Baptouuuu commented Apr 9, 2025

Request

formal-php/orm#45 requires the ability to insert rows for multiple aggregates at once. In SQL this translates to the insert into select queries with virtual columns containing the values to insert.

Implementation

  • Select->columns() now accepts Row\Value to express virtual columns with a specified value.
  • Insert::into() now accepts either a Row\Value or a Select query

Both features combined allows the ORM to build queries to insert values that come from both the storage and provided user values.

@Baptouuuu Baptouuuu added the enhancement New feature or request label Apr 9, 2025
@Baptouuuu Baptouuuu self-assigned this Apr 9, 2025
@codecov
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 97.87234% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.57%. Comparing base (b795786) to head (0a09a18).
Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
src/Query/Insert.php 92.85% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop      #17      +/-   ##
=============================================
- Coverage      97.59%   97.57%   -0.02%     
- Complexity       375      385      +10     
=============================================
  Files             38       38              
  Lines           2160     2190      +30     
=============================================
+ Hits            2108     2137      +29     
- Misses            52       53       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Baptouuuu Baptouuuu marked this pull request as ready for review April 9, 2025 14:16
@Baptouuuu Baptouuuu merged commit 3df7cb5 into develop Apr 9, 2025
36 checks passed
@Baptouuuu Baptouuuu deleted the insert-into-select branch April 9, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants