mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-22 17:04:31 +02:00
More sqlite-utils memory examples in README closes #294
This commit is contained in:
parent
7e2dcbbbea
commit
7479933bc4
1 changed files with 9 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ Python CLI utility and library for manipulating SQLite databases.
|
|||
## Some feature highlights
|
||||
|
||||
- [Pipe JSON](https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-json-data) (or [CSV or TSV](https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-csv-or-tsv-data)) directly into a new SQLite database file, automatically creating a table with the appropriate schema
|
||||
- [Run in-memory SQL queries](https://sqlite-utils.datasette.io/en/stable/cli.html#querying-data-directly-using-an-in-memory-database), including joins, directly against data in CSV, TSV or JSON files and view the results.
|
||||
- [Configure SQLite full-text search](https://sqlite-utils.datasette.io/en/stable/cli.html#configuring-full-text-search) against your database tables and run search queries against them, ordered by relevance
|
||||
- Run [transformations against your tables](https://sqlite-utils.datasette.io/en/stable/cli.html#transforming-tables) to make schema changes that SQLite `ALTER TABLE` does not directly support, such as dropping columns
|
||||
- [Extract columns](https://sqlite-utils.datasette.io/en/stable/cli.html#extracting-columns-into-a-separate-table) into separate tables to better normalize your existing data
|
||||
|
|
@ -32,6 +33,14 @@ Or if you use [Homebrew](https://brew.sh/) for macOS:
|
|||
|
||||
Now you can do things with the CLI utility like this:
|
||||
|
||||
$ sqlite-utils memory dogs.csv "select * from t"
|
||||
[{"id": 1, "age": 4, "name": "Cleo"},
|
||||
{"id": 2, "age": 2, "name": "Pancakes"}]
|
||||
|
||||
$ sqlite-utils insert dogs.db dogs dogs.csv --csv
|
||||
[{"id": 1, "age": 4, "name": "Cleo"},
|
||||
{"id": 2, "age": 2, "name": "Pancakes"}]
|
||||
|
||||
$ sqlite-utils tables dogs.db --counts
|
||||
[{"table": "dogs", "count": 2}]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue