James Kebinger
2007-Aug-28 21:47 UTC
[Betternestedset-talk] get all children and nested children that are also leaf nodes?
Hello all, I''m considering replacing an adjacency list with nest sets - looking at the api I didn''t see an easy way to find all the children/nested children of a node that are leaf nodes. Does anyone know if there''s an elegant way to do that in the api that I missed? Thanks James
Jeremy Nicoll
2007-Aug-29 04:45 UTC
[Betternestedset-talk] get all children and nested children that are also leaf nodes?
Off the top of my head, I do not know, but what you may be able to do is do something like "WHERE lft - rgt = 1" to select leaf nodes in SQL.... -- Jeremy James Kebinger wrote:> Hello all, I''m considering replacing an adjacency list with nest sets > - looking at the api I didn''t see an easy way to find all the > children/nested children of a node that are leaf nodes. Does anyone > know if there''s an elegant way to do that in the api that I missed? > Thanks > James > _______________________________________________ > Betternestedset-talk mailing list > Betternestedset-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/betternestedset-talk > >
Krishna Dole
2007-Aug-29 15:15 UTC
[Betternestedset-talk] get all children and nested children that are also leaf nodes?
#leaves : ) (see also #leaves_count) Krishna On 8/29/07, Jeremy Nicoll <jnicoll at goldnoteexpress.com> wrote:> Off the top of my head, I do not know, but what you may be able to > do is do something like "WHERE lft - rgt = 1" to select leaf nodes in > SQL.... > > -- > Jeremy > > James Kebinger wrote: > > Hello all, I''m considering replacing an adjacency list with nest sets > > - looking at the api I didn''t see an easy way to find all the > > children/nested children of a node that are leaf nodes. Does anyone > > know if there''s an elegant way to do that in the api that I missed? > > Thanks > > James > > _______________________________________________ > > Betternestedset-talk mailing list > > Betternestedset-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/betternestedset-talk > > > > > _______________________________________________ > Betternestedset-talk mailing list > Betternestedset-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/betternestedset-talk >