# Path: chirp/common/chirpradio.py
# def connect():


import codecs
from chirp.common import chirpradio
from djdb import models




def all_matches():
    last_key = None
    while True:
        q = models.SearchMatches.all().order("__key__")
        if last_key:
            q.filter("__key__ >", last_key)
        batch = list(q.fetch(100))
        if not batch:
            break
        last_key = batch[-1].key()
        for sm in batch:
            yield sm



# Path: chirp/common/chirpradio.py
# def connect():


# Path: chirp/library/chirpradio_scripts/do_index_census.py
import codecs
from chirp.common import chirpradio
from djdb import models





def all_matches():
    last_key = None
    while True:
        q = models.SearchMatches.all().order("__key__")
        if last_key:
            q.filter("__key__ >", last_key)
        batch = list(q.fetch(100))
        if not batch:
            break
        last_key = batch[-1].key()
        for sm in batch:
            yield sm



chirpradio.connect()