mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
98 lines
2.6 KiB
Python
98 lines
2.6 KiB
Python
from typing import Any, Optional
|
|
|
|
from django.contrib.postgres import lookups
|
|
from django.db import models
|
|
|
|
class RangeField(models.Field):
|
|
empty_strings_allowed: bool = ...
|
|
base_field: Any = ...
|
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
@property
|
|
def model(self): ...
|
|
@model.setter
|
|
def model(self, model: Any) -> None: ...
|
|
def get_prep_value(self, value: Any): ...
|
|
def to_python(self, value: Any): ...
|
|
def set_attributes_from_name(self, name: str) -> None: ...
|
|
def value_to_string(self, obj: Any): ...
|
|
def formfield(self, **kwargs: Any): ...
|
|
|
|
class IntegerRangeField(RangeField):
|
|
base_field: Any = ...
|
|
range_type: Any = ...
|
|
form_field: Any = ...
|
|
def db_type(self, connection: Any): ...
|
|
|
|
class BigIntegerRangeField(RangeField):
|
|
base_field: Any = ...
|
|
range_type: Any = ...
|
|
form_field: Any = ...
|
|
def db_type(self, connection: Any): ...
|
|
|
|
class FloatRangeField(RangeField):
|
|
base_field: Any = ...
|
|
range_type: Any = ...
|
|
form_field: Any = ...
|
|
def db_type(self, connection: Any): ...
|
|
|
|
class DateTimeRangeField(RangeField):
|
|
base_field: Any = ...
|
|
range_type: Any = ...
|
|
form_field: Any = ...
|
|
def db_type(self, connection: Any): ...
|
|
|
|
class DateRangeField(RangeField):
|
|
base_field: Any = ...
|
|
range_type: Any = ...
|
|
form_field: Any = ...
|
|
def db_type(self, connection: Any): ...
|
|
|
|
class DateTimeRangeContains(models.Lookup):
|
|
lookup_name: str = ...
|
|
rhs: Any = ...
|
|
def process_rhs(self, compiler: Any, connection: Any): ...
|
|
def as_sql(self, compiler: Any, connection: Any): ...
|
|
|
|
class RangeContainedBy(models.Lookup):
|
|
lookup_name: str = ...
|
|
type_mapping: Any = ...
|
|
def as_sql(self, qn: Any, connection: Any): ...
|
|
def get_prep_lookup(self): ...
|
|
|
|
class FullyLessThan(lookups.PostgresSimpleLookup):
|
|
lookup_name: str = ...
|
|
operator: str = ...
|
|
|
|
class FullGreaterThan(lookups.PostgresSimpleLookup):
|
|
lookup_name: str = ...
|
|
operator: str = ...
|
|
|
|
class NotLessThan(lookups.PostgresSimpleLookup):
|
|
lookup_name: str = ...
|
|
operator: str = ...
|
|
|
|
class NotGreaterThan(lookups.PostgresSimpleLookup):
|
|
lookup_name: str = ...
|
|
operator: str = ...
|
|
|
|
class AdjacentToLookup(lookups.PostgresSimpleLookup):
|
|
lookup_name: str = ...
|
|
operator: str = ...
|
|
|
|
class RangeStartsWith(models.Transform):
|
|
lookup_name: str = ...
|
|
function: str = ...
|
|
@property
|
|
def output_field(self): ...
|
|
|
|
class RangeEndsWith(models.Transform):
|
|
lookup_name: str = ...
|
|
function: str = ...
|
|
@property
|
|
def output_field(self): ...
|
|
|
|
class IsEmpty(models.Transform):
|
|
lookup_name: str = ...
|
|
function: str = ...
|
|
output_field: Any = ...
|