1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
``cassandra.cqlengine.query`` - Query and filter model objects
=================================================================
.. module:: cassandra.cqlengine.query
QuerySet
--------
QuerySet objects are typically obtained by calling :meth:`~.cassandra.cqlengine.models.Model.objects` on a model class.
The methods here are used to filter, order, and constrain results.
.. autoclass:: ModelQuerySet
.. automethod:: all
.. automethod:: batch
.. automethod:: consistency
.. automethod:: count
.. method:: len(queryset)
Returns the number of rows matched by this query. This function uses :meth:`~.cassandra.cqlengine.query.ModelQuerySet.count` internally.
*Note: This function executes a SELECT COUNT() and has a performance cost on large datasets*
.. automethod:: distinct
.. automethod:: filter
.. automethod:: get
.. automethod:: limit
.. automethod:: fetch_size
.. automethod:: if_not_exists
.. automethod:: if_exists
.. automethod:: order_by
.. automethod:: allow_filtering
.. automethod:: only
.. automethod:: defer
.. automethod:: timestamp
.. automethod:: ttl
.. automethod:: using
.. _blind_updates:
.. automethod:: update
.. autoclass:: BatchQuery
:members:
.. automethod:: add_query
.. automethod:: execute
.. autoclass:: ContextQuery
.. autoclass:: DoesNotExist
.. autoclass:: MultipleObjectsReturned
.. autoclass:: LWTException
|