-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Lang Feature RefactorRefactoring to new language featuresRefactoring to new language featuresenhancementNew feature or requestNew feature or requestqaImprovements in quality assurance of the projectImprovements in quality assurance of the project
Milestone
Description
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/platformAppendix/Additional Info
No response
Metadata
Metadata
Assignees
Labels
Lang Feature RefactorRefactoring to new language featuresRefactoring to new language featuresenhancementNew feature or requestNew feature or requestqaImprovements in quality assurance of the projectImprovements in quality assurance of the project
Type
Projects
Status
Todo