datasette/tests/plugins/sleep_sql_function.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
155 B
Python
Raw Normal View History

import time
from datasette import hookimpl
@hookimpl
def prepare_connection(conn):
conn.create_function("sleep", 1, lambda n: time.sleep(float(n)))