[Dbix-class] Paging all re nested sets

Charlie Garrison garrison at zeta.org.au
Mon Apr 7 14:48:39 BST 2008


Good evening,

On 6/4/08 at 8:38 PM +0100, Matt S Trout 
<dbix-class at trout.me.uk> wrote:

>Except they're -written-.
>
>http://search.cpan.org/src/MRAMBERG/MojoMojo-0.999013/lib/MojoMojo/Schema/Page.pm

I had seen that before, but I wasn't confident in taking that 
code and creating a generic class (eg. 
DBIx::Class::Tree::NestedSet) or incorporating it directly into 
my code. There was too much code specific to the 'page' metaphor 
for me to separate out the useful NestedSet bits.

I've had a look at the code Sebastian Willert has done though, 
and it seems like a great start on a generic class. I 
particularly like the grouping_column method in Sebastian's 
solution since I have one table with multiple nested sets.

Other than the locking issues that Sebastian talks about, what 
are the issues with his code? It looks pretty complete to me. He 
even includes a Tree::NestedSet::Ordered class which means 95% 
of my requirements are already handled. I can start getting rid 
of my legacy DBI code.

I'm on another project right now, so it will be a couple of 
weeks before I can do anything with Sebastian's code, but I'm 
looking forward to integrating it in my app.


Charlie

-- 
    Charlie Garrison  <garrison at zeta.org.au>
    PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt



More information about the DBIx-Class mailing list