Skip to content

docs: add run_instruction.md - #43

Merged
abdulelahragih merged 1 commit into
mainfrom
feat/add-run-instructions
Sep 9, 2026
Merged

docs: add run_instruction.md#43
abdulelahragih merged 1 commit into
mainfrom
feat/add-run-instructions

Conversation

@abdulelahragih

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings September 9, 2026 16:49

Copilot AI 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.

🟡 Changes recommended

The new documentation contains a few verified inaccuracies/non-runnable snippets that should be corrected before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new developer-facing “Run Instructions” guide to clarify how to install, verify, and test the QueryBuilder PHP library locally and in consuming projects.

Changes:

  • Introduces run_instruction.md covering prerequisites, installation, and basic usage examples.
  • Documents how to run the PHPUnit suite via Composer and via the PHPUnit binary.
  • Adds troubleshooting guidance for common setup/test issues.
File summaries
File Description
run_instruction.md New end-to-end run/testing instructions and usage snippets for the library
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 3
  • Review effort level: Lite

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

Comment thread run_instruction.md
- **Data Collections**: Query results are returned wrapped in custom fluent `Collection` objects (`Abdulelahragih\QueryBuilder\Data\Collection`) with helper methods (`map`, `filter`, `pluck`, `chunk`, `sorted`, etc.).
- **Pagination Support**: Provides both length-aware (`LengthAwarePaginator`) and lightweight simple pagination (`SimplePaginator`).
- **Facades & Helpers**: Includes an instance-based wrapper (`DB`) and a static facade (`DBSingleton`) with automatic transaction management.
- **Safety First**: Implements safeguards such as forbidding `UPDATE` or `DELETE` operations without a `WHERE` clause unless explicitly configured, throwing `QueryBuilderException`.
Comment thread run_instruction.md
Comment on lines +136 to +138
use Abdulelahragih\QueryBuilder\DBSingleton;

DBSingleton::init($pdo);
Comment thread run_instruction.md
Comment on lines +221 to +223
### 2. `QueryBuilderException: UPDATE or DELETE without WHERE clause is not allowed`
- **Cause**: An `update()` or `delete()` operation was invoked without defining condition clauses. This is an intentional safeguard to prevent accidental data truncation.
- **Resolution**: Ensure you chain a `.where(...)` condition before calling `update()` or `delete()`.
@abdulelahragih
abdulelahragih merged commit d33cc09 into main Sep 9, 2026
3 checks passed
@abdulelahragih
abdulelahragih deleted the feat/add-run-instructions branch September 9, 2026 17:16
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