'Executes a SELECT query on the named table with start and limit,
of row numbers, which may return zero or number of rows from start to limit,
returning the result as a list of dicts.
Args:
txn : Transaction object
table (str): the table name
keyvalues (dict[str, T] | None):
column names and values to select the rows with, or None to not
apply a WHERE clause.
pagevalues ([]):
order (str): order the select by this column
start (int): start number to begin the query from
limit (int): number of rows to reterive
retcols (iterable[str]): the names of the columns to return
Returns:
defer.Deferred: resolves to list[dict[str, Any]]'

@classmethod
def _simple_select_list_paginate_txn(cls, txn, table, keyvalues, pagevalues, retcols):

    if keyvalues:
        sql = ('SELECT    %s    FROM    %s    WHERE    %s    ORDER    BY    %s' % (',    '.join(retcols), table, '    AND    '.join((('%s    =    ?' % (k,)) for k in keyvalues)), '    ?    ASC    LIMIT    ?    OFFSET    ?'))
        txn.execute(sql, (keyvalues.values() + pagevalues))
    else:
        sql = ('SELECT    %s    FROM    %s    ORDER    BY    %s' % (',    '.join(retcols), table, '    ?    ASC    LIMIT    ?    OFFSET    ?'))
        txn.execute(sql, pagevalues)
    return cls.cursor_to_dict(txn)
