Skip to content

Fix bug with dot notation field names#27

Merged
brianlmoon merged 6 commits intomainfrom
next
Mar 21, 2026
Merged

Fix bug with dot notation field names#27
brianlmoon merged 6 commits intomainfrom
next

Conversation

@brianlmoon
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses failures when using dot-notation identifiers (e.g., schema.table, users.id) by improving identifier quoting and parameter placeholder generation in the CRUD helper, and adds connection-failure handling in the DB factory path.

Changes:

  • Add dot-notation-aware identifier quoting (quoteField) and encode field names into valid PDO parameter names (fieldToParam) for WHERE/UPDATE clauses.
  • Update CRUD factory creation to handle failed DB initialization.
  • Change Factory::init() / Factory::build() to return false on connection errors instead of propagating \PDOException.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
src/Factory.php Changes connection construction to return false on \PDOException and updates public return types accordingly.
src/CRUD.php Fixes dot-notation support by quoting dotted identifiers per segment and generating valid parameter placeholders for dotted field names.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@brianlmoon brianlmoon merged commit 7b6fa27 into main Mar 21, 2026
3 checks passed
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.

2 participants