mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-10-24 18:27:01 +02:00
Adds a new unique= argument to Database.create_table(), Table.create(),
Table.transform() and the table-creating insert/upsert methods
(insert, insert_all, upsert, upsert_all). A string names a single
column and a tuple names a compound constraint spanning several
columns, so unique=["email"] and unique=[("account_id", "email")]
are both supported. The argument is also available as a table
default via db.table(..., unique=[...]).
Also adds a table.uniques introspection property that lists the
UNIQUE constraints on a table, mirroring table.checks.
Refs #558
|
||
|---|---|---|
| .. | ||
| _static/js | ||
| _templates | ||
| .gitignore | ||
| changelog.rst | ||
| cli-reference.rst | ||
| cli.rst | ||
| codespell-ignore-words.txt | ||
| conf.py | ||
| contributing.rst | ||
| index.rst | ||
| installation.rst | ||
| Makefile | ||
| migrations.rst | ||
| plugins.rst | ||
| python-api.rst | ||
| reference.rst | ||
| tutorial.ipynb | ||
| upgrading.rst | ||