datasette/tests/plugins/sleep_sql_function.py

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

7 lines
154 B
Python
Raw Normal View History

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