[TYPO3-core] RFC #11022: DBAL does not support SQL from (new?) session management

Xavier Perseguers typo3 at perseguers.ch
Sun May 3 21:29:33 CEST 2009


Hi Masi,

Martin Kutschker wrote:
> Xavier Perseguers schrieb:
>> I'm not sure there is a real need to add other logical operators. What
>> do you think? I know that adding those operators now would be quite easy
>> but OTOH I fear it will slow down the review process as nobody uses
>> the.
> 
> I don't anyone will really bother. Adding simple SQL operators bit by
> bit, version by version won't increase trust in DBAL.

Might be a good point...

>>> FYI - Bitwise XOR: ^ (Mysql), # (PostgreSQL)
>> Meaning we should be able to read ^ but output # when backend is
>> PostgreSQL.
> 
> Possibly. Actually I just stated it because I found this difference
> interesting.

To summarize what still would be cool to be done:

- Adding bitwise OR (|)
     For Oracle:  x | y => x - BITAND(x,y) + y

- Adding bitwise XOR (^)
     For Oracle:  x ^ y => x - 2 * BITAND(x,y) + y
     For Postgre: x ^ y => x # y

- Adding bitwise NOT (~)
     ~x => (0 - x) - 1

- Bitwise shifts (<< and >>) seem to be only possible with Java code in 
Oracle :-(

However, I guess there's something more important than adding all kind 
of operators. This would be to be able to have more than one calc 
operator because with current code this does not work either:

... WHERE column1 + column2 + column3 <= 1234

and adding this leads to supporting "extra" parentheses to be able to 
group parts:

... WHERE (column1 / (2 + column2)) >= 1234

Now, this is great but for the moment, I would say that the lack of 
confidence in DBAL is firstly that it is not really maintained and does 
not work for the core itself where there's no need for weird SQL conditions.

I really would prefer stick to small enhancements and localized patches 
as for all other RFC on this list rather than trying to get the holy 
grail and still cannot use the core itself with another DBMS than MySQL.

This is why I propose to commit this patch as is (except if someone 
finds a better way to fix the bug I mentioned) and then create 
additional patches when another bug is encountered with the Core itself 
or with a third party extension.

Do you agree?

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-team-core mailing list