Ability to create unique indexes, refs #14

This commit is contained in:
Simon Willison 2019-02-24 10:41:51 -08:00
commit e7ffbcdb36
3 changed files with 31 additions and 3 deletions

View file

@ -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
======