Skip to content

Commit 2516ff8

Browse files
committed
Make query iterator class public.
See: #487 (comment)
1 parent 2832ce5 commit 2516ff8

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

gcloud/datastore/query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@ def fetch(self, limit=0, offset=0, start_cursor=None, end_cursor=None):
315315
:type end_cursor: offset
316316
:param end_cursor: An optional cursor passed through to the iterator.
317317
318-
:rtype: :class:`_Iterator`
318+
:rtype: :class:`Iterator`
319319
"""
320-
return _Iterator(self, limit, offset, start_cursor, end_cursor)
320+
return Iterator(self, limit, offset, start_cursor, end_cursor)
321321

322322

323-
class _Iterator(object):
323+
class Iterator(object):
324324
"""Represent the state of a given execution of a Query.
325325
"""
326326
_NOT_FINISHED = datastore_pb.QueryResultBatch.NOT_FINISHED

gcloud/datastore/test_query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def test_group_by(self):
412412
['a', 'b', 'c'])
413413

414414

415-
class Test_Iterator(unittest2.TestCase):
415+
class TestIterator(unittest2.TestCase):
416416
_DATASET = 'DATASET'
417417
_NAMESPACE = 'NAMESPACE'
418418
_KIND = 'KIND'
@@ -430,8 +430,8 @@ def tearDown(self):
430430
_implicit_environ.DATASET = self._replaced_dataset
431431

432432
def _getTargetClass(self):
433-
from gcloud.datastore.query import _Iterator
434-
return _Iterator
433+
from gcloud.datastore.query import Iterator
434+
return Iterator
435435

436436
def _makeOne(self, *args, **kw):
437437
return self._getTargetClass()(*args, **kw)

0 commit comments

Comments
 (0)