Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[RFC]: Sql Statement Query Caching

Offen
#112 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@simon-mundy arbeitet bereits daran.

Seit 09.1.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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

Vorherrschende Sprache
PHP
Sterne
18
Forks
8
Ø Merge
6 T. 11 Std.
Gemergte PRs (30 T.)
14

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus php-db/phpdb

Alle Issues in php-db/phpdb

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.