Skip to content

fix: cast OCI8 batch subquery values so updateBatch() and deleteBatch() accept mixed PHP types - #10602

Open
paulbalandan wants to merge 2 commits into
codeigniter4:developfrom
paulbalandan:oci8-batch-mixed-types
Open

paulbalandan wants to merge 2 commits into
codeigniter4:developfrom
paulbalandan:oci8-batch-mixed-types

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
Same bug as #10599 and stacked on #10601.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 6, 2026
@paulbalandan
paulbalandan force-pushed the oci8-batch-mixed-types branch 2 times, most recently from 58d5248 to 7f6d37b Compare October 6, 2026 12:22
@paulbalandan
paulbalandan requested a balanced review from Copilot October 6, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Enum/array operations remain invalid on PostgreSQL, and schema-qualified tables bypass the new casts.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Assuming develop as the base, this PR adds type-aware batch subqueries for PostgreSQL and OCI8.

Changes:

  • Casts batch values using destination-column metadata.
  • Adds mixed-type update/delete regression tests.
  • Documents the fix in the 4.7.5 changelog.

Validation: no project tests run; multi-driver validation remains for CI.

File Description
system/​Database/​Postgre/​Builder.php Adds typed PostgreSQL batch values.
system/​Database/​OCI8/​Builder.php Adds typed OCI8 batch values.
tests/​system/​Database/​Builder/​UpdateTest.php Tests PostgreSQL enum/array SQL generation.
tests/​system/​Database/​Live/​UpdateTest.php Tests mixed-type batch updates.
tests/​system/​Database/​Live/​DeleteTest.php Tests mixed-type batch deletes.
user_guide_src/​source/​changelogs/​v4.7.5.rst Records the database fix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread system/Database/OCI8/Builder.php Outdated
Comment thread system/Database/Postgre/Builder.php Outdated
@paulbalandan
paulbalandan force-pushed the oci8-batch-mixed-types branch from 0c9d6de to aefdc76 Compare October 9, 2026 08:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants