mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-14 07:47:09 +08:00
initial commit
This commit is contained in:
44
django/db/models/sql/subqueries.pyi
Normal file
44
django/db/models/sql/subqueries.pyi
Normal file
@@ -0,0 +1,44 @@
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.fields import CharField
|
||||
from django.db.models.query import QuerySet
|
||||
from django.db.models.sql.query import Query
|
||||
from django.db.models.sql.where import WhereNode
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
List,
|
||||
Optional,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
class AggregateQuery:
|
||||
def add_subquery(self, query: Query, using: str) -> None: ...
|
||||
|
||||
|
||||
class DeleteQuery:
|
||||
def delete_batch(self, pk_list: Union[List[int], List[str]], using: str) -> int: ...
|
||||
def delete_qs(self, query: QuerySet, using: str) -> int: ...
|
||||
def do_query(self, table: str, where: WhereNode, using: str) -> int: ...
|
||||
|
||||
|
||||
class InsertQuery:
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def insert_values(self, fields: Any, objs: Any, raw: bool = ...) -> None: ...
|
||||
|
||||
|
||||
class UpdateQuery:
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def _setup_query(self) -> None: ...
|
||||
def add_related_update(
|
||||
self,
|
||||
model: Type[Model],
|
||||
field: CharField,
|
||||
value: str
|
||||
) -> None: ...
|
||||
def add_update_fields(self, values_seq: Any) -> None: ...
|
||||
def add_update_values(self, values: Dict[str, Any]) -> None: ...
|
||||
def clone(self) -> UpdateQuery: ...
|
||||
def get_related_updates(self) -> List[UpdateQuery]: ...
|
||||
def update_batch(self, pk_list: List[int], values: Dict[str, Union[None, int]], using: str) -> None: ...
|
||||
Reference in New Issue
Block a user