mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-25 10:24:32 +02:00
Ability to list just FTS4 or FTS5 table names
This commit is contained in:
parent
231224ba1a
commit
66fd63b119
8 changed files with 53 additions and 22 deletions
|
|
@ -15,10 +15,16 @@ def cli():
|
|||
type=click.Path(exists=True, file_okay=True, dir_okay=False, allow_dash=False),
|
||||
required=True,
|
||||
)
|
||||
def table_names(path):
|
||||
@click.option(
|
||||
"--fts4", help="Just show FTS4 enabled tables", default=False, is_flag=True
|
||||
)
|
||||
@click.option(
|
||||
"--fts5", help="Just show FTS5 enabled tables", default=False, is_flag=True
|
||||
)
|
||||
def table_names(path, fts4, fts5):
|
||||
"""List the tables in the database"""
|
||||
db = sqlite_utils.Database(path)
|
||||
for name in db.table_names:
|
||||
for name in db.table_names(fts4=fts4, fts5=fts5):
|
||||
print(name)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue