Commit 808f644d authored by Tres Seaver's avatar Tres Seaver

- Use multiunion for range searches on DateIndex, too.

parent b3048e12
...@@ -20,7 +20,7 @@ from types import StringType, FloatType, IntType ...@@ -20,7 +20,7 @@ from types import StringType, FloatType, IntType
from Globals import DTMLFile from Globals import DTMLFile
from BTrees.IOBTree import IOBTree from BTrees.IOBTree import IOBTree
from BTrees.OIBTree import OIBTree from BTrees.OIBTree import OIBTree
from BTrees.IIBTree import IISet, union, intersection from BTrees.IIBTree import IISet, union, intersection, multiunion
_marker = [] _marker = []
...@@ -134,15 +134,16 @@ class DateIndex(UnIndex): ...@@ -134,15 +134,16 @@ class DateIndex(UnIndex):
hi = None hi = None
if hi: if hi:
setlist = index.items(lo,hi) setlist = index.values(lo,hi)
else: else:
setlist = index.items(lo) setlist = index.values(lo)
#for k, set in setlist:
#if type(set) is IntType:
#set = IISet((set,))
#r = set_func(r, set)
# XXX: Use multiunion! # XXX: Use multiunion!
for k, set in setlist: r = multiunion(setlist)
if type(set) is IntType:
set = IISet((set,))
r = set_func(r, set)
else: # not a range search else: # not a range search
for key in keys: for key in keys:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment