1. angri
  2. sqlamp

Commits

angri  committed 188d0dc

todo notice about siblings filter in _pull_nodes()

  • Participants
  • Parent commits 84c819b
  • Branches default

Comments (0)

Files changed (1)

File sqlamp/__init__.py

View file
  • Ignore whitespace
 
     def _pull_nodes(self, up_or_down, session, tree_id, from_path, depth):
         opts = self._mp_opts
+
+        # TODO: move this to MPOptions.filter_siblings_after()
         filter_ = (opts.tree_id_field == tree_id) & \
                   (opts.path_field >= from_path) & \
                   (opts.depth_field == depth)
         parent_path = from_path[:-opts.steplen]
         if parent_path:
             filter_ &= (opts.path_field < inc_path(parent_path, opts.steplen))
+
         nodes = session.execute(
             sqlalchemy.select([opts.pk_field, opts.path_field], filter_) \
                       .order_by(opts.tree_id_field, opts.path_field)