'Get all the pushers that have changed between the given tokens.
Returns:
Deferred(list(tuple)): each tuple consists of:
stream_id (str)
user_id (str)
app_id (str)
pushkey (str)
was_deleted (bool): whether the pusher was added/updated (False)
or deleted (True)'

def get_all_updated_pushers_rows(self, last_id, current_id, limit):

    if (last_id == current_id):
        return defer.succeed([])
    def get_all_updated_pushers_rows_txn(txn):
        sql = 'SELECT    id,    user_name,    app_id,    pushkey    FROM    pushers    WHERE    ?    <    id    AND    id    <=    ?    ORDER    BY    id    ASC    LIMIT    ?'
        txn.execute(sql, (last_id, current_id, limit))
        results = [(list(row) + [False]) for row in txn]
        sql = 'SELECT    stream_id,    user_id,    app_id,    pushkey    FROM    deleted_pushers    WHERE    ?    <    stream_id    AND    stream_id    <=    ?    ORDER    BY    stream_id    ASC    LIMIT    ?'
        txn.execute(sql, (last_id, current_id, limit))
        results.extend(((list(row) + [True]) for row in txn))
        results.sort()
        return results
    return self.runInteraction('get_all_updated_pushers_rows', get_all_updated_pushers_rows_txn)
