Skip to content

Commit

Permalink
Make query iterator class public.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Jan 6, 2015
1 parent 2832ce5 commit 2516ff8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gcloud/datastore/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,12 @@ def fetch(self, limit=0, offset=0, start_cursor=None, end_cursor=None):
:type end_cursor: offset
:param end_cursor: An optional cursor passed through to the iterator.
:rtype: :class:`_Iterator`
:rtype: :class:`Iterator`
"""
return _Iterator(self, limit, offset, start_cursor, end_cursor)
return Iterator(self, limit, offset, start_cursor, end_cursor)


class _Iterator(object):
class Iterator(object):
"""Represent the state of a given execution of a Query.
"""
_NOT_FINISHED = datastore_pb.QueryResultBatch.NOT_FINISHED
Expand Down
6 changes: 3 additions & 3 deletions gcloud/datastore/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def test_group_by(self):
['a', 'b', 'c'])


class Test_Iterator(unittest2.TestCase):
class TestIterator(unittest2.TestCase):
_DATASET = 'DATASET'
_NAMESPACE = 'NAMESPACE'
_KIND = 'KIND'
Expand All @@ -430,8 +430,8 @@ def tearDown(self):
_implicit_environ.DATASET = self._replaced_dataset

def _getTargetClass(self):
from gcloud.datastore.query import _Iterator
return _Iterator
from gcloud.datastore.query import Iterator
return Iterator

def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
Expand Down

0 comments on commit 2516ff8

Please sign in to comment.