mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 14:31:56 +08:00
58 lines
1.7 KiB
Python
58 lines
1.7 KiB
Python
from typing import Any, List, Optional, Tuple, Union
|
|
|
|
from django.db.backends.sqlite3.base import DatabaseWrapper
|
|
from django.db.models.expressions import Combinable, Expression, Value
|
|
from django.db.models.sql.compiler import SQLCompiler
|
|
|
|
from django.db.models import Func, Transform
|
|
|
|
class BytesToCharFieldConversionMixin: ...
|
|
class Chr(Transform): ...
|
|
|
|
class ConcatPair(Func):
|
|
def coalesce(self) -> ConcatPair: ...
|
|
|
|
class Concat(Func): ...
|
|
|
|
class Left(Func):
|
|
def __init__(self, expression: str, length: Union[Value, int], **extra: Any) -> None: ...
|
|
def get_substr(self) -> Substr: ...
|
|
def use_substr(
|
|
self, compiler: SQLCompiler, connection: DatabaseWrapper, **extra_context: Any
|
|
) -> Tuple[str, List[int]]: ...
|
|
|
|
class Length(Transform): ...
|
|
class Lower(Transform): ...
|
|
|
|
class LPad(BytesToCharFieldConversionMixin, Func):
|
|
def __init__(
|
|
self, expression: str, length: Optional[Union[Length, int]], fill_text: Value = ..., **extra: Any
|
|
) -> None: ...
|
|
|
|
class LTrim(Transform): ...
|
|
class Ord(Transform): ...
|
|
|
|
class Repeat(BytesToCharFieldConversionMixin, Func):
|
|
def __init__(self, expression: Union[Value, str], number: Optional[Union[Length, int]], **extra: Any) -> None: ...
|
|
|
|
class Replace(Func):
|
|
def __init__(self, expression: Combinable, text: Value, replacement: Value = ..., **extra: Any) -> None: ...
|
|
|
|
class Right(Left): ...
|
|
class RPad(LPad): ...
|
|
class RTrim(Transform): ...
|
|
class StrIndex(Func): ...
|
|
|
|
class Substr(Func):
|
|
def __init__(
|
|
self,
|
|
expression: Union[Expression, str],
|
|
pos: Union[Expression, int],
|
|
length: Optional[Union[Value, int]] = ...,
|
|
**extra: Any
|
|
) -> None: ...
|
|
|
|
class Trim(Transform): ...
|
|
class Upper(Transform): ...
|
|
class Reverse(Transform): ...
|