Importing databases/ruby-dm-is-nested_set package version 1.2.0.

DataMapper plugin allowing the creation of nested sets from data models.
Provides all the same functionality as dm-is-tree, plus tons more! Read on.

== What is a nested set?

Nested set is a clever model for storing hierarchical data in a flat table.
Instead of (only) storing the id of the parent on each node, a nested set puts
all nodes in a clever structure (see Example below). That is what makes it
possible to get the all of the descendants (not only immediate children),
ancestors, or siblings, in one single query to the database.

The only downside to nested sets (compared to trees] is that the queries it
takes to know these things, and to move nodes around in the tree are rather
complex. That is what this plugin takes care of (+ lots of other neat stuff)!

Nested sets are a good choice for most kinds of ordered trees with more than
two levels of nesting. Very good for menus, categories, and threaded posts.
This commit is contained in:
taca 2011-12-17 17:24:43 +00:00
parent ded1022d4a
commit 956b65ff78
4 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,17 @@
DataMapper plugin allowing the creation of nested sets from data models.
Provides all the same functionality as dm-is-tree, plus tons more! Read on.
== What is a nested set?
Nested set is a clever model for storing hierarchical data in a flat table.
Instead of (only) storing the id of the parent on each node, a nested set puts
all nodes in a clever structure (see Example below). That is what makes it
possible to get the all of the descendants (not only immediate children),
ancestors, or siblings, in one single query to the database.
The only downside to nested sets (compared to trees] is that the queries it
takes to know these things, and to move nodes around in the tree are rather
complex. That is what this plugin takes care of (+ lots of other neat stuff)!
Nested sets are a good choice for most kinds of ordered trees with more than
two levels of nesting. Very good for menus, categories, and threaded posts.

View file

@ -0,0 +1,14 @@
# $NetBSD: Makefile,v 1.1.1.1 2011/12/17 17:24:43 taca Exp $
DISTNAME= dm-is-nested_set-1.2.0
CATEGORIES= databases
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://github.com/datamapper/dm-is-nested_set
COMMENT= DataMapper plugin allowing the creation of nested sets from data models
LICENSE= mit
DEPENDS+= ${RUBY_PKGPREFIX}-dm-adjust>=1.2.0<1.3:../../databases/ruby-dm-adjust
.include "../../lang/ruby/gem.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,18 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2011/12/17 17:24:43 taca Exp $
${GEM_HOME}/cache/${GEM_NAME}.gem
${GEM_LIBDIR}/Gemfile
${GEM_LIBDIR}/LICENSE
${GEM_LIBDIR}/README.rdoc
${GEM_LIBDIR}/Rakefile
${GEM_LIBDIR}/VERSION
${GEM_LIBDIR}/dm-is-nested_set.gemspec
${GEM_LIBDIR}/lib/dm-is-nested_set.rb
${GEM_LIBDIR}/lib/dm-is-nested_set/is/nested_set.rb
${GEM_LIBDIR}/spec/integration/nested_set_spec.rb
${GEM_LIBDIR}/spec/rcov.opts
${GEM_LIBDIR}/spec/spec.opts
${GEM_LIBDIR}/spec/spec_helper.rb
${GEM_LIBDIR}/tasks/spec.rake
${GEM_LIBDIR}/tasks/yard.rake
${GEM_LIBDIR}/tasks/yardstick.rake
${GEM_HOME}/specifications/${GEM_NAME}.gemspec

View file

@ -0,0 +1,5 @@
$NetBSD: distinfo,v 1.1.1.1 2011/12/17 17:24:43 taca Exp $
SHA1 (dm-is-nested_set-1.2.0.gem) = 33777da3df1fe87263014dd096efa16a49b697b6
RMD160 (dm-is-nested_set-1.2.0.gem) = 67806cfeb1024c88fc95a1daf5ab4d9fb7c27e6b
Size (dm-is-nested_set-1.2.0.gem) = 13824 bytes