mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-17 17:35:59 +08:00
initial commit
This commit is contained in:
35
django/core/cache/backends/db.pyi
vendored
Normal file
35
django/core/cache/backends/db.pyi
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
from datetime import datetime
|
||||
from django.db.backends.utils import CursorWrapper
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
Optional,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
class BaseDatabaseCache:
|
||||
def __init__(self, table: str, params: Dict[str, Union[int, Callable, str, Dict[str, int]]]) -> None: ...
|
||||
|
||||
|
||||
class DatabaseCache:
|
||||
def _base_set(self, mode: str, key: str, value: Any, timeout: object = ...): ...
|
||||
def _cull(self, db: str, cursor: CursorWrapper, now: datetime) -> None: ...
|
||||
def add(
|
||||
self,
|
||||
key: str,
|
||||
value: Union[str, bytes, Dict[str, int], int],
|
||||
timeout: object = ...,
|
||||
version: Optional[int] = ...
|
||||
) -> bool: ...
|
||||
def clear(self) -> None: ...
|
||||
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
|
||||
def get(self, key: str, default: Optional[Union[str, int]] = ..., version: Optional[int] = ...) -> Any: ...
|
||||
def has_key(self, key: str, version: Optional[int] = ...): ...
|
||||
def set(self, key: str, value: Any, timeout: object = ..., version: Optional[int] = ...) -> None: ...
|
||||
def touch(self, key: str, timeout: Optional[int] = ..., version: None = ...) -> bool: ...
|
||||
|
||||
|
||||
class Options:
|
||||
def __init__(self, table: str) -> None: ...
|
||||
Reference in New Issue
Block a user