Merge branch 'main' into create-transform

This commit is contained in:
Simon Willison 2022-08-27 15:12:58 -07:00 committed by GitHub
commit 5fdf4d9731
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 341 additions and 54 deletions

View file

@ -119,7 +119,10 @@ See :ref:`cli_query`.
escaped strings
-r, --raw Raw output, first column of first row
-p, --param <TEXT TEXT>... Named :parameters for SQL query
--load-extension TEXT SQLite extensions to load
--functions TEXT Python code defining one or more custom SQL
functions
--load-extension TEXT Path to SQLite extension, with optional
:entrypoint
-h, --help Show this message and exit.
@ -159,6 +162,8 @@ See :ref:`cli_memory`.
sqlite-utils memory animals.csv --schema
Options:
--functions TEXT Python code defining one or more custom SQL
functions
--attach <TEXT FILE>... Additional databases to attach - specify alias and
filepath
--flatten Flatten nested JSON objects, so {"foo": {"bar":
@ -185,7 +190,8 @@ See :ref:`cli_memory`.
--dump Dump SQL for in-memory database
--save FILE Save in-memory database to this file
--analyze Analyze resulting tables and output results
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional
:entrypoint
-h, --help Show this message and exit.
@ -262,7 +268,7 @@ See :ref:`cli_inserting_data`, :ref:`cli_insert_csv_tsv`, :ref:`cli_insert_unstr
--default <TEXT TEXT>... Default value that should be set for a column
-d, --detect-types Detect types for columns in CSV/TSV data
--analyze Run ANALYZE at the end of this operation
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
--silent Do not show progress bar
--ignore Ignore records if pk already exists
--replace Replace records if pk already exists
@ -316,7 +322,7 @@ See :ref:`cli_upsert`.
--default <TEXT TEXT>... Default value that should be set for a column
-d, --detect-types Detect types for columns in CSV/TSV data
--analyze Run ANALYZE at the end of this operation
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
--silent Do not show progress bar
-h, --help Show this message and exit.
@ -345,6 +351,7 @@ See :ref:`cli_bulk`.
Options:
--batch-size INTEGER Commit every X records
--functions TEXT Python code defining one or more custom SQL functions
--flatten Flatten nested JSON objects, so {"a": {"b": 1}} becomes
{"a_b": 1}
--nl Expect newline-delimited JSON
@ -359,7 +366,7 @@ See :ref:`cli_bulk`.
--sniff Detect delimiter and quote character
--no-headers CSV file has no header row
--encoding TEXT Character encoding for input, defaults to utf-8
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -399,7 +406,7 @@ See :ref:`cli_search`.
textile, tsv, unsafehtml, youtrack
--json-cols Detect JSON cols and output them as JSON, not escaped
strings
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -435,7 +442,7 @@ See :ref:`cli_transform_table`.
--default-none TEXT Remove default from this column
--drop-foreign-key TEXT Drop foreign key constraint for this column
--sql Output SQL without executing it
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -460,7 +467,7 @@ See :ref:`cli_extract`.
--table TEXT Name of the other table to extract columns to
--fk-column TEXT Name of the foreign key column to add to the table
--rename <TEXT TEXT>... Rename this column in extracted table
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -482,7 +489,7 @@ See :ref:`cli_schema`.
sqlite-utils schema trees.db
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -520,7 +527,7 @@ See :ref:`cli_insert_files`.
--text Store file content as TEXT, not BLOB
--encoding TEXT Character encoding for input, defaults to utf-8
-s, --silent Don't show a progress bar
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -544,7 +551,7 @@ See :ref:`cli_analyze_tables`.
Options:
-c, --column TEXT Specific columns to analyze
--save Save results to _analyze_tables table
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -651,7 +658,7 @@ See :ref:`cli_tables`.
strings
--columns Include list of columns for each table
--schema Include schema for each table
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -689,7 +696,7 @@ See :ref:`cli_views`.
strings
--columns Include list of columns for each view
--schema Include schema for each view
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -713,6 +720,7 @@ See :ref:`cli_rows`.
Options:
-c, --column TEXT Columns to return
--where TEXT Optional where clause
-o, --order TEXT Order by ('column' or 'column desc')
-p, --param <TEXT TEXT>... Named :parameters for where clause
--limit INTEGER Number of rows to return - defaults to everything
--offset INTEGER SQL offset to use
@ -729,7 +737,8 @@ See :ref:`cli_rows`.
simple, textile, tsv, unsafehtml, youtrack
--json-cols Detect JSON cols and output them as JSON, not
escaped strings
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional
:entrypoint
-h, --help Show this message and exit.
@ -764,7 +773,7 @@ See :ref:`cli_triggers`.
textile, tsv, unsafehtml, youtrack
--json-cols Detect JSON cols and output them as JSON, not escaped
strings
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -800,7 +809,7 @@ See :ref:`cli_indexes`.
textile, tsv, unsafehtml, youtrack
--json-cols Detect JSON cols and output them as JSON, not escaped
strings
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -824,7 +833,7 @@ See :ref:`cli_create_database`.
Options:
--enable-wal Enable WAL mode on the created database
--init-spatialite Enable SpatiaLite on the created database
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -857,7 +866,7 @@ See :ref:`cli_create_table`.
--ignore If table already exists, do nothing
--replace If table already exists, replace it
--transform If table already exists, try to transform the schema
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -887,7 +896,7 @@ See :ref:`cli_create_index`.
--unique Make this a unique index
--if-not-exists, --ignore Ignore if index already exists
--analyze Run ANALYZE after creating the index
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -915,7 +924,7 @@ See :ref:`cli_fts`.
--create-triggers Create triggers to update the FTS tables when the
parent table changes.
--replace Replace existing FTS configuration if it exists
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -935,7 +944,7 @@ populate-fts
sqlite-utils populate-fts chickens.db chickens name
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -955,7 +964,7 @@ rebuild-fts
sqlite-utils rebuild-fts chickens.db chickens
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -975,7 +984,7 @@ disable-fts
sqlite-utils disable-fts chickens.db chickens
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -999,7 +1008,7 @@ See :ref:`cli_optimize`.
Options:
--no-vacuum Don't run VACUUM
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1064,7 +1073,7 @@ See :ref:`cli_dump`.
sqlite-utils dump chickens.db
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1092,7 +1101,7 @@ See :ref:`cli_add_column`.
omitted will automatically use the primary key
--not-null-default TEXT Add NOT NULL DEFAULT 'TEXT' constraint
--ignore If column already exists, do nothing
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1118,7 +1127,7 @@ See :ref:`cli_add_foreign_key`.
Options:
--ignore If foreign key already exists, do nothing
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1142,7 +1151,7 @@ See :ref:`cli_add_foreign_keys`.
authors country_id countries id
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1164,7 +1173,7 @@ See :ref:`cli_index_foreign_keys`.
sqlite-utils index-foreign-keys chickens.db
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1186,7 +1195,7 @@ See :ref:`cli_wal`.
sqlite-utils enable-wal chickens.db
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1206,7 +1215,7 @@ disable-wal
sqlite-utils disable-wal chickens.db
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1228,7 +1237,7 @@ See :ref:`cli_enable_counts`.
sqlite-utils enable-counts chickens.db
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1248,7 +1257,7 @@ reset-counts
sqlite-utils reset-counts chickens.db
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1265,7 +1274,7 @@ duplicate
Options:
--ignore If table does not exist, do nothing
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1288,7 +1297,7 @@ See :ref:`cli_drop_table`.
Options:
--ignore If table does not exist, do nothing
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1313,7 +1322,7 @@ See :ref:`cli_create_view`.
Options:
--ignore If view already exists, do nothing
--replace If view already exists, replace it
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1336,7 +1345,7 @@ See :ref:`cli_drop_view`.
Options:
--ignore If view does not exist, do nothing
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.
@ -1367,7 +1376,8 @@ See :ref:`cli_spatialite`.
--dimensions TEXT Coordinate dimensions. Use XYZ for three-
dimensional geometries.
--not-null Add a NOT NULL constraint.
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional
:entrypoint
-h, --help Show this message and exit.
@ -1389,7 +1399,7 @@ See :ref:`cli_spatialite_indexes`.
paths. To load it from a specific path, use --load-extension.
Options:
--load-extension TEXT SQLite extensions to load
--load-extension TEXT Path to SQLite extension, with optional :entrypoint
-h, --help Show this message and exit.