simonw / simonw/sqlite-utils

`sqlite-utils tables data.db table1 table2`

Open
#478 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cli-tool enhancement
Dominant language
Python
Stars
2.2k
Forks
172
Avg merge
9m
Merged PRs (30d)
1

Description

The sqlite-utils tables command currently lists all tables.

If you have a huge table in there then running it with --counts can get expensive, because of the huge table.

Would be useful if it could accept an optional list of tables that it should execute against, as an alternative to the default of all of them.

This should be a backwards compatible change. Current design is: https://sqlite-utils.datasette.io/en/stable/cli-reference.html#tables

Usage: sqlite-utils tables [OPTIONS] PATH

  List the tables in the database

  Example:

      sqlite-utils tables trees.db

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the sqlite-utils tables CLI entry point and its current behavior described in the CLI reference. Check how --counts currently processes tables, then define the optional table-list behavior while preserving the default of listing all tables. Done means selected tables can be processed without scanning unrelated large tables, and existing invocations remain compatible.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
cli, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.