[TYPO3-core] RFC #15457: Add support for prepared queries

Jigal van Hemert jigal at xs4all.nl
Sun Aug 15 21:31:47 CEST 2010


Hi Xavier,

On 14-8-2010 23:14, Xavier Perseguers wrote:
> Having support for prepared queries would allow to implement an
> efficient caching mechanism when using DBAL which would result in a huge
> speed improvement.

A few general comments first.

Ever since the speed of PDO was improved, it's a good opportunity to 
bring this object oriented approach in your system.

> It will provide a PDO-like syntax which could, in a second phase, allow
> TYPO3 to issue real prepared statements to the underlying DBMS. In

This actually "forces" us to stick as close to the PDO implementation as 
possible.

- PARAM_AUTOTYPE is not present in PDO, so this will require extra code 
when using PDO itself. I wonder if it's worth...

- fetch* functions in PDO default to FETCH_BOTH; is there a reason to do 
something else?

- thawValuesInQuery: named markers are only replaced once in PDO. Also 
markers are only replaced in certain parts of the query; I haven't 
tested whether this works.

I just found my PHP4 PDO class in an old archive. I'll look up if that 
implementation replaces the markers correctly. Maybe there are a few 
useful parts in that class. More tomorrow morning...

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-team-core mailing list