mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Ability to create unique indexes, refs #14
This commit is contained in:
parent
1b6025e8ab
commit
e7ffbcdb36
3 changed files with 31 additions and 3 deletions
|
|
@ -388,6 +388,13 @@ By default the index will be named ``idx_{table-name}_{columns}`` - if you want
|
|||
index_name="good_dogs_by_age"
|
||||
)
|
||||
|
||||
You can create a unique index by passing ``unique=True``::
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
dogs.create_index(["name"], unique=True)
|
||||
|
||||
|
||||
Vacuum
|
||||
======
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue