Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[RFC]: Sql Statement Query Caching

オープン
#112 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@simon-mundy がすでに取り組んでいます。

2026年1月9日 から。

評価

この issue はまだ評価されていません。

説明

enhancement Lang Feature Refactor qa
Proposed Version

0.6.0

Basic Information

PhpDb manually compiles each Select query for every single query, creating unnecessary overhead when a query itself will not change based on adapter/platform.

The intention of this proposal is to allow a caching mechanism which would determine if a Statement uses a Parameter Container and if so, store the compiled query in a cache that is user-determined. This still allows the database driver to correctly quote/execute data without needing to cache-bust regularly.

Background

No response

Considerations

No response

Proposal(s)

Sample pseudo code:-

$select->from('foo')->where([
    'c1' => null,
    'c2' => [1, 2, 3],
    new \Laminas\Db\Sql\Predicate\IsNotNull('c3'),
]);
// Cached string is 'SELECT "foo".* FROM "foo" WHERE "c1" IS NULL AND "c2" IN (?, ?, ?) AND "c3" IS NOT NULL'

$statement = $sql->prepareStatementForSqlObject($select, $storage); // where $storage is a PSR-6 compliant storage wrapper
$results = $statement->execute(); // Statement will use pre-prepared SQL string based on driver/adapter/platform
Appendix/Additional Info

No response

主要言語
PHP
スター
18
フォーク
8
平均マージ
6日 11時間
マージ済み PR(30日)
14

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

php-db/phpdb のほかの issue

php-db/phpdb の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。