[Typo3-dev] DBAL Drivers
Karsten Dambekalns
karsten at typo3.org
Fri Mar 18 14:27:05 CET 2005
Hi Ries.
Ries van Twisk wrote:
> Also DBAL doesn't use any SQL standard, for example:
> This will NOT work:
> $feu = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
> 'tx_rvtpermapi_ur.perm_rights perm_rights, tx_rvtpermapi_ur.extention
> extention, fe_users.usergroup usergroup, fe_users.uid uid ',
> 'fe_users feu,
> tx_rvtpermapi_ur fep',
> "feu.uid =fep.uid
> AND feu.uid=$uid AND fep.extention LIKE '$extention%';");
>
> This will work
> $feu = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
> 'tx_rvtpermapi_ur.perm_rights perm_rights, tx_rvtpermapi_ur.extention
> extention, fe_users.usergroup usergroup, fe_users.uid uid ',
> 'fe_users,
> tx_rvtpermapi_ur',
> "fe_users.uid =
> tx_rvtpermapi_ur.uid AND fe_users.uid=$uid AND
> tx_rvtpermapi_ur.extention LIKE '$extention%';");
> and more, as long as DBAL IS a choice, then it will always be
> 'backwards' compatible (According to Karsten).
> Then DBAL will never replace the current SQL functions AND more
> importand, extentions will never be 100% DBAL compatible
> since a lot of extention developers will not use DBAL!!!! This will
> break installations with DBAL or without DBAL.
Hm. As DBAL will be a hard requirement for even being reviewed, a lot of
people will switch to using those methods. I'm very positive wrt to that.
And a lot of extensions already use DBAL, after all it has been added in
3.6.2 already. Some things have changed, but all in all it's not too bad.
> I have heard that DBAL DOES parse the SQL which will slow down any DB
> not using MySQL which is kinda bad, not to mention really bad.
Right. But there's no way to make mapping of field/table names possible
(with or without ADOdb). If you don't need the mapping, this is still
needed for various things, but parts are skipped to speed up things.
Optimization can and will be done.
> If it was for me, I would love to see a AdoDB interface instead of DBAL
> and change all ext_tables.sql file to XML schema's (AdoDB can use the
> .sql files aswell.)
Heh. How long would you want to wait then, for all the ext authors to
follow? This may be the way to go for TYPO3 NG (version 8 or so...), but it
won't happen too soon. Although it would be very nice, point taken.
Anyway, another thought here is, only a very few need/want DBAL, so all
those that use MySQL should have *minimum* speed impact. This is achieved
the way we do this now, as native MySQL access, without the DBAL extension
is routed with almmost no overhead.
Regards,
Karsten
--
Karsten Dambekalns
TYPO3 Association - Active Member
http://association.typo3.org/
More information about the TYPO3-dev
mailing list