Пример #1
0
def whatchanged_sql_insert_statements():
    from sql import insert_statement, insert_many_statement
    stream = ({"id":commit, "action":action, "path":path}
                for commit, path_list in whatchanged()
                for action, path in path_list)

    return insert_many_statement(list(stream), "Commit_actions")
Пример #2
0
def log_sql_insert_statements():
    from sql import insert_statement, insert_many_statement
    return insert_many_statement(list(log()), "Commit_log")
    insert_commit_log = lambda x : insert_statement(x, "Commit_log")
    return '\n\n'.join(map(insert_commit_log, log()))