feat: Implement a prepare_connection plugin hook

This commit is contained in:
Alex Garcia 2023-07-22 15:31:53 -07:00
commit ae973e794b
4 changed files with 78 additions and 2 deletions

View file

@ -8,3 +8,8 @@ hookimpl = HookimplMarker("sqlite_utils")
@hookspec
def register_commands(cli):
"""Register additional CLI commands, e.g. 'sqlite-utils mycommand ...'"""
@hookspec
def prepare_connection(conn):
"""Modify SQLite connection in some way e.g. register custom SQL functions"""