Files
django-stubs/django-stubs/db/models/indexes.pyi
2019-01-06 21:00:01 +03:00

24 lines
1.0 KiB
Python

from typing import Any, Dict, List, Optional, Tuple, Type, Union
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.backends.ddl_references import Statement
from django.db.models.base import Model
class Index:
model: Type[Model]
suffix: str = ...
max_name_length: int = ...
fields: List[str] = ...
fields_orders: List[Tuple[str, str]] = ...
name: str = ...
db_tablespace: Optional[str] = ...
def __init__(self, *, fields: Any = ..., name: Optional[Any] = ..., db_tablespace: Optional[Any] = ...) -> None: ...
def check_name(self) -> List[str]: ...
def create_sql(
self, model: Type[Model], schema_editor: BaseDatabaseSchemaEditor, using: str = ...
) -> Statement: ...
def remove_sql(self, model: Type[Model], schema_editor: BaseDatabaseSchemaEditor) -> str: ...
def deconstruct(self) -> Tuple[str, Tuple, Dict[str, Union[List[str], str]]]: ...
def clone(self) -> Index: ...
def set_name_with_model(self, model: Type[Model]) -> None: ...