mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-19 18:31:15 +08:00
some stubs
This commit is contained in:
51
django-stubs/db/models/aggregates.pyi
Normal file
51
django-stubs/db/models/aggregates.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.db.models.expressions import Func
|
||||
from django.db.models.query_utils import Q
|
||||
|
||||
class Aggregate(Func):
|
||||
name: Any = ...
|
||||
filter_template: str = ...
|
||||
window_compatible: bool = ...
|
||||
filter: Any = ...
|
||||
def __init__(self, *args: Any, filter: Optional[Any] = ..., **kwargs: Any) -> None: ...
|
||||
|
||||
class Avg(Aggregate):
|
||||
filter: None
|
||||
function: str = ...
|
||||
name: str = ...
|
||||
|
||||
class Count(Aggregate):
|
||||
filter: None
|
||||
function: str = ...
|
||||
name: str = ...
|
||||
template: str = ...
|
||||
output_field: Any = ...
|
||||
def __init__(self, expression: str, distinct: bool = ..., filter: Optional[Q] = ..., **extra: Any) -> None: ...
|
||||
|
||||
class Max(Aggregate):
|
||||
filter: None
|
||||
function: str = ...
|
||||
name: str = ...
|
||||
|
||||
class Min(Aggregate):
|
||||
filter: None
|
||||
function: str = ...
|
||||
name: str = ...
|
||||
|
||||
class StdDev(Aggregate):
|
||||
filter: None
|
||||
name: str = ...
|
||||
output_field: Any = ...
|
||||
function: str = ...
|
||||
|
||||
class Sum(Aggregate):
|
||||
filter: None
|
||||
function: str = ...
|
||||
name: str = ...
|
||||
|
||||
class Variance(Aggregate):
|
||||
filter: None
|
||||
name: str = ...
|
||||
output_field: Any = ...
|
||||
function: str = ...
|
||||
Reference in New Issue
Block a user