Package amplee :: Package indexer :: Class DateIndex
[show private | hide private]
[frames | no frames]

Type DateIndex

object --+    
         |    
 BaseIndex --+
             |
            DateIndex

Known Subclasses:
PublishedIndex, UpdatedIndex

Method Summary
  __init__(self, name, target, container, granularity)
Base class for date based inde handlers.
  between(self, start, end)
Returns a dictionnary of the forum {collection_name: [member_id]} which have been indexed between the two provided dates.
  day(cls, dt)
  hour(cls, dt)
(Class method)
  minute(cls, dt)
(Class method)
  month(cls, dt)
(Class method)
  update(self, member)
  year(cls, dt)
(Class method)
    Inherited from BaseIndex
  iterindex(self, func)
Iterates through the keys of the container and apply for each one the provided ``func`` with the key and the data associated.
  keys(self)
Return all the existing keys in the container as a list.
  load(self, key)
Returns the value associated with the key as a set of one element.
  store(self, key, value)
Stores a value within the index container
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Instance Method Details

__init__(self, name, target, container=None, granularity=None)
(Constructor)

Base class for date based inde handlers.

The ``target`` is the name of the element within the atom entry to search for.

The ``granularity`` is one of the classmethods of this class that indicates what will be the granularity of the key of the index.

The lower the finer but also the more keys you will have. It defaults to ``DateIndex.hour``.
Overrides:
amplee.indexer.BaseIndex.__init__

between(self, start, end)

Returns a dictionnary of the forum {collection_name: [member_id]} which have been indexed between the two provided dates.

Generated by Epydoc 2.1 on Thu Jul 19 15:32:16 2007 http://epydoc.sf.net