atetrel / squiggle-sql

Automatically exported from code.google.com/p/squiggle-sql
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

SelectQuery does not support Join clause #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Actually SelectQuery handles JOIN clause as where clause.

Would be great to support real JOIN clause (LEFT, INNER, FULL ...).

To solve this problem, we have overriden SelectQuery.toString() (this is
ugly ...)

Original issue reported on code.google.com by benoit.g...@gmail.com on 15 Jun 2009 at 3:04

GoogleCodeExporter commented 8 years ago
Finally, i 've created a CustomizableSelectQuery which override write() method 
and
explode this one in 5 protected method: 

@Override
public void write(Output out) {

 appendSelectClause(out);
 appendFromClause(out);
 appendJoinClauses(out);
 appendWhereClause(out);
 appendOrderClause(out);
}

IHMO, it gives more flexibility.

Original comment by benoit.g...@gmail.com on 15 Jun 2009 at 3:57

GoogleCodeExporter commented 8 years ago
You can use SelectQuery.addOuterJoin; it has a parameter that indicates if you 
want to use Left Outer Join or not (Similar to Left Join) .

Original comment by mahdi.el...@gmail.com on 21 May 2013 at 7:46

GoogleCodeExporter commented 8 years ago
Hi,
Which version has addOuterJoin method? I did not find it in the latest 2.0.0

I added my own criteria for outer joins (Left and Right). I would like to 
contribute this to the source. This would be my first open source contribution. 
Please let me know if I can and how.

Thanks,
Pravin

Original comment by june.pra...@gmail.com on 19 Jun 2013 at 4:49

GoogleCodeExporter commented 8 years ago
Hello,

Iam using squiggle and would like to know how to add join methods

Thanks,
Shalvin

Original comment by shalvin....@gmail.com on 20 May 2014 at 3:11