[sqlalchemy] Patch: Use generators for ShardedQuery results (Was: Re: [sqlalchemy] Re: sharding and combining sort result from multiple db)

2008-04-27 Thread Kyle Schaffrick
On Sun, 27 Apr 2008 20:39:25 -0400 Kyle Schaffrick <[EMAIL PROTECTED]> wrote: > > On Sun, 27 Apr 2008 20:23:24 -0400 > Michael Bayer <[EMAIL PROTECTED]> wrote: > > > > But yes its probably how that section should be done anyway so > > that ShardedQuery so that the iterative framework provided by

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-04-27 Thread Kyle Schaffrick
On Sun, 27 Apr 2008 20:23:24 -0400 Michael Bayer <[EMAIL PROTECTED]> wrote: > > But yes its probably how that section should be done anyway so that > ShardedQuery so that the iterative framework provided by > iterate_instances() (this method would need to be used instead of > instances()).

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-04-27 Thread Michael Bayer
On Apr 27, 2008, at 5:04 PM, Kyle Schaffrick wrote: > partial = partial + list(...) > > The bits inside that list() calls up to Query.instances for each shard > in the for loop, which seems to return an iterator. > > Assuming the desired ordering can be figured out from that spot, and a > pytho

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-04-27 Thread Kyle Schaffrick
On Thu, 27 Mar 2008 10:24:10 -0400 Michael Bayer <[EMAIL PROTECTED]> wrote: > > On Mar 27, 2008, at 7:39 AM, crybaby wrote: > > > > Correct me if I am wrong, as of right now, relationship between > > multiple db shards, like sorting, grouping and joins have to be done > > in application level. >

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-03-27 Thread Michael Bayer
On Mar 27, 2008, at 7:39 AM, crybaby wrote: > > Correct me if I am wrong, as of right now, relationship between > multiple db shards, like sorting, grouping and joins have to be done > in application level. that is correct; the ShardedQuery currently just concatentates results from each indiv

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-03-27 Thread crybaby
Correct me if I am wrong, as of right now, relationship between multiple db shards, like sorting, grouping and joins have to be done in application level. Joe On Mar 26, 11:02 am, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Mar 24, 2008, at 7:46 PM, crybaby wrote: > > > > > I am thinking of se

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-03-26 Thread Michael Bayer
On Mar 24, 2008, at 7:46 PM, crybaby wrote: > > I am thinking of setting up a small sharding db as an example. I have > a question about how one would be able to combine sort result from > multiple db and still maintain the sort order? > > Anyone have any suggestions? > since noone has made an