mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 01:44:31 +02:00
Added vacuum to CLI and Python API
This commit is contained in:
parent
fd5829b27d
commit
231224ba1a
6 changed files with 40 additions and 0 deletions
|
|
@ -20,3 +20,14 @@ def table_names(path):
|
|||
db = sqlite_utils.Database(path)
|
||||
for name in db.table_names:
|
||||
print(name)
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.argument(
|
||||
"path",
|
||||
type=click.Path(exists=True, file_okay=True, dir_okay=False, allow_dash=False),
|
||||
required=True,
|
||||
)
|
||||
def vacuum(path):
|
||||
"""Run VACUUM against the database"""
|
||||
sqlite_utils.Database(path).vacuum()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue