Module v.c.a.queryutil

Part of vmc.contrib.axiom

No module docstring
Function contains Return an axiom.iaxiom.IComparison (an object that can be
Function overlapping Return an axiom.iaxiom.IComparison (an object that can be passed as the
Class AttributeTuple Undocumented
def contains(startAttribute, endAttribute, value):
Return an axiom.iaxiom.IComparison (an object that can be passed as the 'comparison' argument to Store.query/.sum/.count) which will constrain a query against 2 attributes for ranges which contain the given argument. The range is half-open.
def overlapping(startAttribute, endAttribute, startValue, endValue):
Return an L{axiom.iaxiom.IComparison} (an object that can be passed as the
 'comparison' argument to Store.query/.sum/.count) which will constrain a
 query against 2 attributes for ranges which overlap with the given
 arguments.

 For a database with Items of class O which represent values in this
 configuration:

         X                   Y
        (a)                 (b)
         |-------------------|
   (c)      (d)
    |--------|          (e)      (f)
                         |--------|

(g) (h)
 |---|                            (i)    (j)
                                   |------|

(k)                                   (l)
 |-------------------------------------|

        (a)                           (l)
         |-----------------------------|
   (c)                      (b)
    |------------------------|

   (c)  (a)
    |----|
                            (b)       (l)
                             |---------|

 The query:
     myStore.query(
         O,
         findOverlapping(O.X, O.Y,
                         a, b))

 Will return a generator of Items of class O which represent segments a-b,
 c-d, e-f, k-l, a-l, c-b, c-a and b-l, but NOT segments g-h or i-j.

 (NOTE: If you want to pass attributes of different classes for
 startAttribute and endAttribute, read the implementation of this method to
 discover the additional join clauses required.  This may be eliminated some
 day so for now, consider this method undefined over multiple classes.)

 In the database where this query is run, for an item N, all values of
 N.startAttribute must be less than N.endAttribute.

 startValue must be less than endValue.

 
def _tupleCompare(tuple1, ineq, tuple2, eq=a == b, ander=AND, orer=OR):
Compare two 'in-database tuples'. Useful when sorting by a compound key and slicing into the middle of that query.
def _tupleLessThan(tuple1, tuple2):
Undocumented
def _tupleGreaterThan(tuple1, tuple2):
Undocumented
API Documentation for vodafone-mobile-connect-card-driver-for-linux, generated by pydoctor at 2008-01-10 13:06:31.