mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-05-24 17:28:41 +08:00
Adjust Postgres indexes for Django 3.2 (#616)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
- case: can_instantiate_index
|
||||
main: |
|
||||
from django.db import models
|
||||
from django.db.models.functions import Lower
|
||||
from django.contrib.postgres.indexes import {{ index }}
|
||||
{{ index }}(fields=["foo"])
|
||||
{{ index }}(models.F("bar"), name="test")
|
||||
{{ index }}("foo", models.F("bar"), Lower("baz"), name="test")
|
||||
{{ index }}("foo", name="test", opclasses=["bar"])
|
||||
{{ index }}("foo", name="test", condition=models.Q(foo=1))
|
||||
{{ index }}("foo", name="test", include=["bar"])
|
||||
parametrized:
|
||||
- index: BrinIndex
|
||||
- index: BTreeIndex
|
||||
- index: GinIndex
|
||||
- index: GistIndex
|
||||
- index: HashIndex
|
||||
- index: SpGistIndex
|
||||
Reference in New Issue
Block a user