[RFC]: Sql Statement Query Caching
メンテナーはふだん 1 日以内に返信
@simon-mundy がすでに取り組んでいます。
2026年1月9日 から。
評価
この issue はまだ評価されていません。
説明
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 ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php-db/phpdb のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
RFC
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
RFC
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
-
RFC
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
RFC
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
VilnaCRM-Org/user-service#525 ·
メンテナーはふだん 21 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
shukiv/jabali-panel#2029 ·
メンテナーはふだん 1 日以内に返信
-
area:pool-types good first issue priority:low type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
crazy-goat/php-fpm-ng#822 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
vigetlabs/mega-menu-block#30 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100