mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-12 23:16:31 +08:00
24 lines
1.0 KiB
Python
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: ...
|