[Opensource] implementing outer join in MultiDBObject?
Malcolm Wise
malcolm.wise at sde.eu.sony.com
Tue Feb 25 00:05:17 PST 2003
Mike,
I've checked this in. It's pretty basic at the moment, but when I get time
I'll flesh it out a bit.
Cheers
Malc
-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com]On Behalf Of Mike Traum
Sent: 21 February 2003 19:30
To: 'opensource at jcorporate.com'
Subject: RE: [Opensource] implementing outer join in MultiDBObject?
That sounds like what I'm looking for. I don't need it asap, so in the head
would be great.
Thanks a lot,
mike
-----Original Message-----
From: Malcolm Wise [mailto:malcolm.wise at sde.eu.sony.com]
Sent: Friday, February 21, 2003 3:44 AM
To: opensource at jcorporate.com
Subject: RE: [Opensource] implementing outer join in MultiDBObject?
Hi Mike,
I did actually implement this in my own code, but in the end didn't use it
because I accomplished the same thing using ValidValues. I basically added
some setter methods to MultiDBObject along the lines of the setForeignKey()
method - setInnerJoin(String leftShortName, String leftColumn, String
rightShortName, String rightColumn), setLeftJoin(Stringl eftShortName,
String leftColumn, String rightShortName, String rightColumn) and
setRightJoin(String leftShortName, String leftColumn, String rightShortName,
String rightColumn). The joins are built using ANSI syntax in the FROM
clause, so should be pretty portable (I use Sybase ASE12). I've only
allowed for '=' in the join, but it shouldn't be a great deal more work to
allow for others (just an extra parameter for the above methods should do
it). Here's an example of what's produced:
SELECT table1.x, table1.y, table2.z
FROM table1 LEFT JOIN table2 ON table1.a = table2.b
If this seems to fit the bill, I can make the changes in HEAD, or I can
send you the details off-list if you need it sooner
(malcolm.wise at sde.eu.sony.com).
Cheers,
Malc
-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com]On Behalf Of Mike Traum
Sent: 21 February 2003 01:06
To: Expresso Mailing List (E-mail)
Subject: [Opensource] implementingo uter join in MultiDBObject?
Something I've been wondering for a while is why outer join's are
implemented in MultiDBObject. The way I see it, it would be quite simple -
just have a setter and then check for that, adding 'OUTER JOIN' ('left' and
'right' if you want to support that) to the where clause. Am I missing
something or should I go for it? (the only thing I could think of is
database incompatibilities, which seems unlikely)
thanks,
mike
*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20030225/17825b76/attachment-0002.htm
More information about the Opensource
mailing list