[TYPO3-dev] DB query iterator; worth a try?
Xavier Perseguers
typo3 at perseguers.ch
Thu Apr 22 08:31:53 CEST 2010
Hey,
> But, as Dmitry mentioned in other threads, we're really bloating this
> API. While I'm +1 for those methods, I'm against further arbitrary
> methods that might be neat (like a new more sophisticated delete method
> that that supports joins), because they are a) more or less bound to
> mysql and b) they make t3lib_db in its current incarnation even more ugly.
That's not wrong ;-)
> Here are some needs for a future solution. This is a brainstorming and
> it's mixing up different layers:
> - be extensible, eg. with an api to register own handlers for special
> query needs, no need for xclasses
> - still fully cross-db compatible
> - have a better oo interface supporting eg. iterators
> - get a simple and clean api, which is straight to use and easy to
> unterstand
> - don't loose performance
> - still have build-in goodies like quoting, which proofed to make so
> many extensions and core more secure
> - support things like views or stored procedures
> - and, as always, be fully backwards compatible
>
> Any ideas on how something like that could be achieved? I know on the
> other hand, if we want real abstraction on model / repository level, it
> would probably be wiser to use extbase for such a task anyway. But that
> doesn't solve basic db needs in our low-level t3lib_db.
"real" DBAL usage with Extbase has not been done yet. I had some start of discussion with Jochen long time ago but I did not investigate anymore. But even if I agree that their way of creating queries
eases and allows other DBMS to be used, it's utopia to try to get rid of t3lib_db at all and we cannot and don't want to force users to use Extbase (thus having it as a required sysext) at that point
of time. Perhaps one way would be to somehow integrate Extbase's DB layer part into Core (thus moving it away from there), refactor t3lib_db and t3lib_sqlparser to make them look prettier and get
advantage of your idea of having "hooks" there in order for DBAL to be integrate where it fits, without relying on XCLASS anymore.
--
Xavier Perseguers
http://xavier.perseguers.ch/en
More information about the TYPO3-dev
mailing list