Add some details in the docs for limit(None) and fetch_size()
This commit is contained in:
@@ -753,14 +753,19 @@ class AbstractQuerySet(object):
|
||||
|
||||
def limit(self, v):
|
||||
"""
|
||||
Limits the number of results returned by Cassandra.
|
||||
Limits the number of results returned by Cassandra. Use *0* or *None* to disable.
|
||||
|
||||
*Note that CQL's default limit is 10,000, so all queries without a limit set explicitly will have an implicit limit of 10,000*
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# Fetch 100 users
|
||||
for user in User.objects().limit(100):
|
||||
print(user)
|
||||
|
||||
# Fetch all users
|
||||
for user in User.objects().limit(None):
|
||||
print(user)
|
||||
"""
|
||||
|
||||
if v is None:
|
||||
@@ -782,7 +787,7 @@ class AbstractQuerySet(object):
|
||||
"""
|
||||
Sets the number of rows that are fetched at a time.
|
||||
|
||||
*Note that driver's default fetch size is 5000.
|
||||
*Note that driver's default fetch size is 5000.*
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ The methods here are used to filter, order, and constrain results.
|
||||
|
||||
.. automethod:: limit
|
||||
|
||||
.. automethod:: fetch_size
|
||||
|
||||
.. automethod:: if_not_exists
|
||||
|
||||
.. automethod:: if_exists
|
||||
|
||||
Reference in New Issue
Block a user