File: test_indexes.yml

package info (click to toggle)
python-django-stubs 5.2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,832 kB
  • sloc: python: 5,185; makefile: 15; sh: 8
file content (10 lines) | stat: -rw-r--r-- 470 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
-   case: model_index
    main: |
        from django.db import models
        from django.db.models.functions import Lower
        models.Index(fields=["foo"])
        models.Index(models.F("bar"), name="test")
        models.Index("foo", models.F("bar"), Lower("baz"), name="test")
        models.Index("foo", name="test", opclasses=["bar"])
        models.Index("foo", name="test", condition=models.Q(foo=1))
        models.Index("foo", name="test", include=["bar"])