disable-fts and .disable_fts(), closes #88

This commit is contained in:
Simon Willison 2020-02-26 20:40:35 -08:00
commit f9473ace14
6 changed files with 96 additions and 0 deletions

View file

@ -300,6 +300,19 @@ def populate_fts(path, table, column):
db[table].populate_fts(column)
@cli.command(name="disable-fts")
@click.argument(
"path",
type=click.Path(exists=True, file_okay=True, dir_okay=False, allow_dash=False),
required=True,
)
@click.argument("table")
def disable_fts(path, table):
"Disable FTS for specific table"
db = sqlite_utils.Database(path)
db[table].disable_fts()
def insert_upsert_options(fn):
for decorator in reversed(
(