class xr_query_flags¶
Flag class: additional properties for an xr_query .
xr_query_flags Members¶
| Constructors | none |
| Static Method | from_integer() |
| Methods | __and__(), __cmp__(), __eq__(), __ge__(), __gt__(), __hash__(), __invert__(), __le__(), __lt__(), __ne__(), __or__(), __repr__(), __str__(), as_integer(), name() |
| Attributes | NONE, POPULATE_COUNTERS, UNIQUIFY |
xr_query_flags Details¶
-
class
cs.xr_query_flags¶ Flag class: additional properties for an
xr_query.-
static
from_integer(_inner)¶ Construct an instance from an integer representation.
Parameters: _inner (int) – The integer representation, as returned by xr_query_flags.as_integer().Return type: xr_query_flagsRaises: result.ERROR_INVALID_ARGUMENTif_inneris not a valid integer representation for axr_query_flagsinstance.Invariant: For
xr_query_flagsx, xr_query_flags.from_integer(x.as_integer()) == x>>> xqf = (xr_query_flags.UNIQUIFY | xr_query_flags.POPULATE_COUNTERS).as_integer() >>> xqf 3 >>> xr_query_flags.from_integer(xqf) <cs.xr_query_flags uniquify|populate_counters>
-
__and__(b)¶ AND operator for
xr_query_flags.Parameters: b ( xr_query_flags) – AND operand.Return type: xr_query_flagsReturns: A xr_query_flagsobject containing all flags that are in bothselfandb.>>> xr_query_flags.NONE & xr_query_flags.UNIQUIFY <cs.xr_query_flags none>
-
__cmp__(other)¶ Comparison function for
xr_query_flags, with respect to a stable overall ordering.Parameters: other ( xr_query_flags) – Thexr_query_flagsobject to compare against.Return type: int Returns: An integer N such that: - N==0 if the two objects compare equal
- N<0 if
self< other - N>0 if
self> other
>>> xr_query_flags.UNIQUIFY.__cmp__(xr_query_flags.POPULATE_COUNTERS) -1
-
__eq__(b)¶ Equality operator for
xr_query_flags.Parameters: b ( xr_query_flags) – Thexr_query_flagsobject to compare against.Return type: bool Returns: Trueifselfandbcompare equal,Falseotherwise.>>> xr_query_flags.UNIQUIFY == xr_query_flags.NONE False
-
__ge__(b)¶ Greater-than-or-equal operator for
xr_query_flags.Parameters: b ( xr_query_flags) – Thexr_query_flagsobject to compare against.Return type: bool Returns: Trueifself>=b,Falseotherwise.>>> xr_query_flags.UNIQUIFY >= xr_query_flags.NONE True
-
__gt__(b)¶ Greater-than operator for
xr_query_flags.Parameters: b ( xr_query_flags) – Thexr_query_flagsobject to compare against.Return type: bool Returns: Trueifself>b,Falseotherwise.>>> xr_query_flags.POPULATE_COUNTERS > xr_query_flags.UNIQUIFY True
-
__hash__()¶ Hash function for
xr_query_flags.Return type: int >>> hash(xr_query_flags.NONE) 0
-
__invert__()¶ Complementation operator.
Return type: xr_query_flagsReturns: A xr_query_flagsobject containing the flags that are NOT contained inself.>>> ~xr_query_flags.UNIQUIFY <cs.xr_query_flags populate_counters>
-
__le__(b)¶ Less-than-or-equal operator for
xr_query_flags.Parameters: b ( xr_query_flags) – Thexr_query_flagsobject to compare against.Return type: bool Returns: Trueifself<=b,Falseotherwise.>>> xr_query_flags.POPULATE_COUNTERS <= xr_query_flags.UNIQUIFY False
-
__lt__(b)¶ Less-than operator for
xr_query_flags.Parameters: b ( xr_query_flags) – Thexr_query_flagsobject to compare against.Return type: bool Returns: Trueifself<b,Falseotherwise.>>> xr_query_flags.POPULATE_COUNTERS < xr_query_flags.NONE False
-
__ne__(b)¶ Inequality operator for
xr_query_flags.Parameters: b ( xr_query_flags) – Thexr_query_flagsobject to compare against.Return type: bool Returns: Falseifselfandbcompare equal,Trueotherwise.>>> xr_query_flags.NONE != xr_query_flags.POPULATE_COUNTERS True
-
__or__(b)¶ OR operator for
xr_query_flags.Parameters: b ( xr_query_flags) – OR operand.Return type: xr_query_flagsReturns: A xr_query_flagsobject containing all flags that are in at least one ofself,b.>>> xr_query_flags.NONE | xr_query_flags.POPULATE_COUNTERS <cs.xr_query_flags populate_counters>
-
__repr__()¶ Get a representation of a
xr_query_flagsobject that includes information useful for debugging.Return type: str Returns: The string representation. >>> repr(xr_query_flags.UNIQUIFY) '<cs.xr_query_flags uniquify>'
-
__str__()¶ Get a simple string representation of a
xr_query_flagsobject.Return type: str Returns: The string representation. >>> str(xr_query_flags.POPULATE_COUNTERS) 'populate_counters'
-
as_integer()¶ Get an integer representation of
self.Return type: int Returns: An integer suitable for use with xr_query_flags.from_integer().Invariant: For
xr_query_flagsx, xr_query_flags.from_integer(x.as_integer()) == x>>> xqf = (xr_query_flags.UNIQUIFY | xr_query_flags.POPULATE_COUNTERS).as_integer() >>> xqf 3 >>> xr_query_flags.from_integer(xqf) <cs.xr_query_flags uniquify|populate_counters>
-
name()¶ Get the name of a
xr_query_flagsobject.Return type: str >>> xr_query_flags.POPULATE_COUNTERS.name() 'populate_counters'
-
NONE¶ Empty set: contains no flags.
>>> xr_query_flags.NONE <cs.xr_query_flags none>
-
POPULATE_COUNTERS¶ Singleton set containing the “populate counters” flag: compute and store tuple counts for later retrieval by
xr_query_iteratorget_*() functions.The following are only available when this flag is specified.
xr_query_iterator.get_scanned_count()xr_query_iterator.get_unscanned_count()xr_query_iterator.get_matched_count().
>>> xr_query_flags.POPULATE_COUNTERS <cs.xr_query_flags populate_counters>
-
UNIQUIFY¶ Singleton set containing the “uniquify” flag: specifies whether and how the query will perform ‘uniquification’ on its result set.
Behavior depends on whether or not a comparison function
qcmpfor thexr_queryhas been specified withxr_query.set_cmp().- If
qcmpis not specified:- If
xr_query_flags.UNIQUIFYis specified, the query will return only unique tuples. (That is, if the raw result set contains a subset of tuples that are identical across all values, all but one of those tuples will be removed before returning the set.) - If
xr_query_flags.UNIQUIFYis not specified, no uniquification is performed.
- If
- If
cmpis specified:- If
xr_query_flags.UNIQUIFYis specified, the query will perform uniquification with respect toqcmp:if the raw result set contains a subset of tuples that all compare equal according toqcmp, all but one of those tuples will be removed before returning the set.) - If
xr_query_flags.UNIQUIFYis not specified, the query will perform uniquification with respect to complete tuple uniqueness (that is, the same unquification strategy as used whenqcmpis not specified andxr_query_flags.UNIQUIFYis specified).
- If
>>> xr_query_flags.UNIQUIFY <cs.xr_query_flags uniquify>
- If
-
static