mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 00:07:09 +08:00
82 lines
2.3 KiB
Python
82 lines
2.3 KiB
Python
from datetime import datetime
|
|
from sqlite3 import Connection
|
|
from typing import (
|
|
Any,
|
|
Callable,
|
|
Dict,
|
|
List,
|
|
Optional,
|
|
Tuple,
|
|
Union,
|
|
)
|
|
|
|
|
|
def _sqlite_date_extract(lookup_type: str, dt: str) -> int: ...
|
|
|
|
|
|
def _sqlite_date_trunc(lookup_type: str, dt: str) -> str: ...
|
|
|
|
|
|
def _sqlite_datetime_cast_date(dt: str, tzname: Optional[str]) -> str: ...
|
|
|
|
|
|
def _sqlite_datetime_cast_time(dt: str, tzname: Optional[str]) -> str: ...
|
|
|
|
|
|
def _sqlite_datetime_extract(lookup_type: str, dt: str, tzname: Optional[str]) -> int: ...
|
|
|
|
|
|
def _sqlite_datetime_parse(dt: str, tzname: Optional[str]) -> datetime: ...
|
|
|
|
|
|
def _sqlite_datetime_trunc(lookup_type: str, dt: str, tzname: Optional[str]) -> str: ...
|
|
|
|
|
|
def _sqlite_format_dtdelta(conn: str, lhs: Union[str, int], rhs: Union[str, int]) -> str: ...
|
|
|
|
|
|
def _sqlite_lpad(text: str, length: int, fill_text: str) -> str: ...
|
|
|
|
|
|
def _sqlite_regexp(re_pattern: str, re_string: Optional[str]) -> bool: ...
|
|
|
|
|
|
def _sqlite_rpad(text: str, length: int, fill_text: str) -> str: ...
|
|
|
|
|
|
def _sqlite_time_extract(lookup_type: str, dt: str) -> int: ...
|
|
|
|
|
|
def _sqlite_time_trunc(lookup_type: str, dt: str) -> str: ...
|
|
|
|
|
|
def _sqlite_timestamp_diff(lhs: str, rhs: str) -> int: ...
|
|
|
|
|
|
def decoder(conv_func: Callable) -> Callable: ...
|
|
|
|
|
|
class DatabaseWrapper:
|
|
def _savepoint_allowed(self) -> bool: ...
|
|
def _set_autocommit(self, autocommit: bool) -> None: ...
|
|
def _start_transaction_under_autocommit(self) -> None: ...
|
|
def check_constraints(self, table_names: List[str] = ...) -> None: ...
|
|
def close(self) -> None: ...
|
|
def create_cursor(self, name: None = ...) -> SQLiteCursorWrapper: ...
|
|
def disable_constraint_checking(self) -> bool: ...
|
|
def enable_constraint_checking(self) -> None: ...
|
|
def get_connection_params(self) -> Dict[str, Union[int, str]]: ...
|
|
def get_new_connection(self, conn_params: Dict[str, Union[int, str]]) -> Connection: ...
|
|
def init_connection_state(self) -> None: ...
|
|
def is_in_memory_db(self) -> bool: ...
|
|
def is_usable(self) -> bool: ...
|
|
|
|
|
|
class SQLiteCursorWrapper:
|
|
def convert_query(self, query: str) -> str: ...
|
|
def execute(self, query: str, params: Any = ...) -> SQLiteCursorWrapper: ...
|
|
def executemany(
|
|
self,
|
|
query: str,
|
|
param_list: Union[List[Tuple[int]], List[Tuple[int, int]]]
|
|
) -> SQLiteCursorWrapper: ... |