flywheel.fields.conditions module

Query constraints

class flywheel.fields.conditions.Condition[source]

Bases: object

A constraint that will be applied to a query or scan

Attributes

eq_fields dict Mapping of field name to field value
fields dict Mapping of field name to (operator, value) tuples
limit int Maximum number of results
index_name str Name of index to use for a query
classmethod construct(field, op, other)[source]

Create a Condition on a field

Parameters:

field : str

Name of the field to constrain

op : str

Operator, such as ‘eq’, ‘lt’, or ‘contains’

other : object

The value to constrain the field with

Returns:

condition : Condition

classmethod construct_index(name)[source]

Force the query to use a certain index

Parameters:name : str
Returns:condition : Condition
classmethod construct_limit(count)[source]

Create a condition that will limit the results to a count

Parameters:count : int
Returns:condition : Condition
query_kwargs(model)[source]

Get the kwargs for doing a table query

scan_kwargs()[source]

Get the kwargs for doing a table scan

Read the Docs v: 0.1.3
Versions
latest
0.1.3
0.1.2
0.1.1
0.1.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.