Skip to content

Read table existence from query result rows - #30

Merged
alexstandiford merged 2 commits into
mainfrom
codex/table-exists-array-contract
Sep 28, 2026
Merged

alexstandiford merged 2 commits into
mainfrom
codex/table-exists-array-contract

Conversation

@alexstandiford

@alexstandiford alexstandiford commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

What changed

TableExistsStrategy::exists() now reads DatabaseStrategy::query() as an array and checks information_schema.TABLES with an active-schema-scoped exact predicate. Literal % and _ characters no longer act as LIKE wildcards. The real MySQL regression includes wildcard-shaped absent names alongside matching decoy tables.

The result contract is explicit: an empty metadata result means absence, query failure preserves the existing false result, and malformed result or row shapes raise UnexpectedValueException instead of being silently treated as absence.

Stack

This draft is based on coordinated query PR #28 at 23d08b97ffc2d21c81f921fe944cc5451acddfed. It is the review base for retirement PR #29.

Proof

Against isolated MySQL 8.4.11:

  • focused real-driver and failure regression: 5 tests, 12 assertions, no skips
  • full package: 799 tests, 5,176 assertions
  • the two full-suite skips are the existing MySQL 5.7-only contracts
  • PHPStan level 5 passes for lib and tests
  • repository spellcheck passes
  • changed-file formatting and diff checks pass

No merge, release, tag, or deployment is included.

@alexstandiford
alexstandiford force-pushed the codex/table-exists-array-contract branch from 68091d2 to 96ab539 Compare September 21, 2026 01:33
@alexstandiford
alexstandiford changed the base branch from codex/coordinated-query-strategy to main September 28, 2026 18:00
@alexstandiford
alexstandiford marked this pull request as ready for review September 28, 2026 18:01
@alexstandiford
alexstandiford merged commit e312826 into main Sep 28, 2026
8 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T18:02:31.948023Z 96ab539 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant