gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdl2: SQLExpression / Postgresql / left joins...


From: Manuel Guesdon
Subject: gdl2: SQLExpression / Postgresql / left joins...
Date: Wed, 23 Jul 2003 20:20:56 +0200 (CEST)

Hi,

I've found a problem handling left/right joins with postgresql: Postgresql 
doesn't accept syntax like where t0.a *= t1.b
It accepts this only in FROM clause, like:
        FROM xx as t0 left join yy as t1 on t0.a=t1.b
Actually, joins are used when building joinClause and the joinClause is added 
to where clause. Joins are not processed in
-tableListWithRootEntity (which build from clause)

One way to work around this will be to subclass -joinExpression and 
-tableListWithRootEntity in PostgresSQLExpression but
this mean, IMHO, too much code duplication.

Another solution could be to have a method in SQLExpression like 
-isJoinClauseInFromClause or
-isSupportingOuterJoinInWhereClause and call this in EOSQLExpression 
-joinExpression and -tableListWithRootEntit to know
where we have to put joins.

Any opinion ?

Dave, as you've written a Postgres adaptor, how did you solved this ?


Manuel
--
______________________________________________________________________
Manuel Guesdon - OXYMIUM <address@hidden>
14 rue Jean-Baptiste Clement  -  93200 Saint-Denis  -  France
Tel: +33 1 4940 0999  -  Fax: +33 1 4940 0998





reply via email to

[Prev in Thread] Current Thread [Next in Thread]