mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-03 16:04:13 +02:00
table.create_index(..., analyze=True), refs #378
This commit is contained in:
parent
04e319a18d
commit
ced9034383
3 changed files with 19 additions and 3 deletions
|
|
@ -774,6 +774,14 @@ def test_create_index_find_unique_name(fresh_db):
|
|||
assert index_names == {"idx_t_id", "idx_t_id_2", "idx_t_id_3"}
|
||||
|
||||
|
||||
def test_create_index_analyze(fresh_db):
|
||||
dogs = fresh_db["dogs"]
|
||||
assert "sqlite_stat1" not in fresh_db.table_names()
|
||||
dogs.insert({"name": "Cleo", "twitter": "cleopaws"})
|
||||
dogs.create_index(["name"], analyze=True)
|
||||
assert "sqlite_stat1" in fresh_db.table_names()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"data_structure",
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue