Split SQuery into SQuerySql

Anthony Berglas <[email protected]>
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
Hello Franck,

I've created session.SQuerySql that separates out (most of) the SQL 
generation from dataset.SQuery.  This was one of the last structural 
issues so I thought it best to get it out of the way.

Unit tests pass, but better tests are needed.

I have killed disjunction etc. for now.  Needs a little though as to 
the syntax (poking "("s won't do!).
Formally it should be something like
   qry = new SQuery(...).or(new SQuery().eq(...), new Squery(...).ne(...), ...)
but that is very ugly.  Or maybe
   qry = new SQuery(...).beginDisjoin().eq(...)....endDisjoin();
Or maybe reintroduce the needConjunction hack.

Or maybe decide that this is not simple, and make a special case for 
refField <> refField.  Use rawClause for odd cases.

I would also like eq/ne(field, null) to be handled automatically by 
SQuery.  (convert to IS NULL)  Need to be careful about Oracle where 
x = "" must also be converted.  So the conversion needs to happen in 
SQuery.Sql.

The entire Join processing needs review.

Anthony


Dr Anthony Berglas, [email protected]       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.