[TYPO3-dev] extbase and SQL functions

Adrien Crivelli adrien.crivelli at gmail.com
Wed Jun 1 11:18:40 CEST 2011


I'm wondering why SQL functions should/will not be supported, at least in
WHERE clauses. I definitely see the point to avoid them in SELECT parts as
this may imply complex management of "real properties" vs "computed
properties". But in my case it's only used to filter data. And I think it
makes perfect sense to compute stuff in WHERE clauses, instead of storing
pre-computed fields. It is easier to maintain (no "duplicated" data) and it
does not necessary has a bad impact on performance (but may have a huge
benefit on database size).

Adding support for functions, or any other raw SQL, within WHERE clause
would actually be pretty straightforward as long as it is made in extbase
itself. It's a matter of one 'elseif' and one subclass to allow any raw SQL
as constraint. And this would give much more power to developers, while
still keeping all benefit from extbase (implicit use of standard fields,
straightdorward use of Tx_Extbase_DomainObject_AbstractEntity, etc.).

Anyway, I'll be sure to post on
typo3-project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>next
time, thank for the tip :)



On 31 May 2011 12:53, Peter Niederlag <typo3-list at niekom.de> wrote:

> Hello,
>
> Am 31.05.2011 10:58, schrieb Adrien Crivelli:
>
>> Hello,
>>
> [...]
>
>  $c = $query->equals('md5(concat(`uid`, `recipient_address`))',
>> $authcode);
>>
>
> using SQL functions is not supported (and probably will never be).
>
> It should be fairly simple to do a plain SQL-query and convert the result
> into proper objects yourself(or just assign plain array to fluid).
>
> btw,
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvcis a ML/newsgroup for that tiny special interest group "extbase/fluid". ;)
>
> [...]
>
> Greets and hth,
> Peter
> --
> Peter Niederlag
> http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>




More information about the TYPO3-dev mailing list