Oleg Broytmann <phd <at> phd.pp.ru> writes:
> 
>    I have a desire to do that, but not much time...

Not swimming in time here, but this is looking like a promising approach to my
current critical work.

>    Do you mean SelectResults.ops["orderBy"], ops["join"], ops["start"],
> ops["end"], etc.?

Indeed, although I'd probably leave that interface alone at the moment and
instead provide a SelectResults.select (SelectResults.query?) that is the
sqlbuilder.Select, with it's .orderBy, .limit, etc. Adding to each's underlying
format where functionality is currently missing on one or the other.

But in the end I don't really intend to interact directly with the underlying
storage format in either case, because I can also see a quickly-approaching
desire to have matched interfaces for the SelectResults methods like filter,
reversed, accumulate*, etc. That is, part of my intention is to be able to 
write:

x.filter(Phone.q.id==PhoneCall.q.phoneID).orderBy(PhoneCall.q.callDate)

Not caring whether x is a Select or SelectResults, ie whether x is bound to
return a specific SQLObject class yet, etc. And then going the other way, asking
to get back X-type (SQLObject-based) records from this query:

X.select(query=x)

Or use it as an aliased join criteria:

X.select(X.q.id==x.q.id)

So an alternate implementation approach would be to have a
sqlbuilder.Select-like object that has the transformative methods implemented
and can provide/utilize an ops[]-like storage, plus .clause. My feeling however
is that leaving parts of query construction isolated in dbconnection is going to
be insufficient for my intentions. But I'll probably play with both approaches
for another hour or so.

I'm thinking that sqlbuilder.Table (or at least AliasTable) should also
eventually get in on this fun, probably growing a .select method that returns a
Select that can then be filter'ed etc.

Thoughts? I'm making this up as I go, like everyone else.

- Luke


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to