Beispiel #1
0
def order_topics_by_insertions(q: Queryable):
    """
    Number of insertions.
    """
    return apply(
        [where(a_('is_topic')),
         order_by(a_('inserted_diffs').count())], q)
Beispiel #2
0
def order_topics_by_insertion_length(q: Queryable):
    """
    Text Length.
    """
    return apply([
        where(a_('is_topic')),
        order_by(query(a_('inserted_diffs')).sum(lambda x: len(x[1])))
    ])
def items_edited_during_standard(q: Queryable):
    return apply([
        where(And(a_('is_item'), a_('edited'), a_('during_standard'))),
    ], q)
def where_unchanged_contains(q: Queryable, string: str):
    return apply([where(m_('unchanged_contains', string))], q)
def where_inserted_contains(q: Queryable, strings: List[str]):
    return apply([where(m_('inserted_contains', strings))], q)
def where_deleted_contains(q: Queryable, string: str):
    return apply([where(m_('deleted_contains', string))], q)