Defines database index model for Django ORM, handling fields, expressions, conditions.
# Source: https://github.com/django/django | License: BSD-3-Clause | Copyright Django Software Foundation and individual contributors
# Provided via justclaw.it.com; keep this notice with the code.
from types import NoneType
from django.core import checks
from django.db.backends.utils import names_digest, split_identifier
from django.db.models.expressions import Col, ExpressionList, F, Func, OrderBy
from django.db.models.functions import Collate
from django.db.models.query_utils import Q
from django.db.models.sql import Query
from django.utils.functional import partition
__all__ = ["Index"]
class Index:
suffix = "idx"
# The max length of the name of the index (restricted to 30 for
# cross-database compatibility with Oracle)
max_name_length = 30
def __init__(
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key