Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-20 Thread Johan Carlsson
Oleg Broytmann wrote: > On Wed, Aug 01, 2007 at 08:37:19AM +0200, Johan Carlsson wrote: > >> class Brain: >> >> _connection = sqlhub >> columnList=[] >> sqlmeta = sqlmeta >> > >Brain is a substitute for SQLObject, and I think it could be a better > substitute - it should con

Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-13 Thread Oleg Broytmann
On Wed, Aug 01, 2007 at 08:37:19AM +0200, Johan Carlsson wrote: > class Brain: > > _connection = sqlhub > columnList=[] > sqlmeta = sqlmeta Brain is a substitute for SQLObject, and I think it could be a better substitute - it should construct proper sqlmeta, it should have column d

Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-07 Thread Johan Carlsson
Hi again, Quick question regarding the SelectResults code. In the "count" method there is a assert line: def count(self): """ Counting elements of current select results """ assert not self.ops.get('limit'), "'limit' is meaningless with 'distinct'" <= assert n

Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-03 Thread Luke Opperman
As with the general questions that come up around .select() and joins, the underlying issue is the expectation that "instances of a SQLObject-derived class are returned". So in your work here, the main bit is creating a fake class that is "enough" like a SQLObject. Also in trunk (views.py) is an a

Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-03 Thread Oleg Broytmann
On Fri, Aug 03, 2007 at 08:51:33PM +0200, Johan Carlsson wrote: > Oleg Broytmann wrote: > >Luke Oppermann did a unification in the trunk and merged SelectResults, > > Select() and dbconnection.queryForSelect(). Now Select() is the > > lowest-level API that implements all features - joins, slice

Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-03 Thread Johan Carlsson
Oleg Broytmann wrote: > On Fri, Aug 03, 2007 at 04:24:14PM +0200, Johan Carlsson wrote: > >> It's for taking a select object created with sqlbuilder.Select and >> return a SelectResults derived class of it, >> that can be iterated over ir or over slices, or call methods like >> count() and etc

Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-03 Thread Oleg Broytmann
On Fri, Aug 03, 2007 at 04:24:14PM +0200, Johan Carlsson wrote: > It's for taking a select object created with sqlbuilder.Select and > return a SelectResults derived class of it, > that can be iterated over ir or over slices, or call methods like > count() and etc. Luke Oppermann did a unific

Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-03 Thread Johan Carlsson
Oleg Broytmann wrote: > On Wed, Aug 01, 2007 at 08:37:19AM +0200, Johan Carlsson wrote: > >> I though I post my current work here for comments >> > >But what it's all about? A lot of classes without a line of > explanation... > Typically me I'm afraid :-D It's for taking a select ob

Re: [SQLObject] A SelectResults derived class to handle join queries

2007-08-02 Thread Oleg Broytmann
On Wed, Aug 01, 2007 at 08:37:19AM +0200, Johan Carlsson wrote: > I though I post my current work here for comments But what it's all about? A lot of classes without a line of explanation... Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED] Prog

[SQLObject] A SelectResults derived class to handle join queries

2007-07-31 Thread Johan Carlsson
Hi, I though I post my current work here for comments and also if someone needs it :-D I hope to be able to integrate this work in to SQLObject at some point, or help out with a similar effort. (I've just started looking at the SQLObject devel process.) Notes: I've think this (most) work, but