mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 05:24:53 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
110
django-stubs-generated/db/backends/base/base.pyi
Normal file
110
django-stubs-generated/db/backends/base/base.pyi
Normal file
@@ -0,0 +1,110 @@
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional
|
||||
|
||||
from django.db.backends.sqlite3.base import (DatabaseWrapper,
|
||||
SQLiteCursorWrapper)
|
||||
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
||||
from django.db.backends.utils import CursorDebugWrapper, CursorWrapper
|
||||
from django.db.utils import DatabaseErrorWrapper
|
||||
|
||||
NO_DB_ALIAS: str
|
||||
|
||||
class BaseDatabaseWrapper:
|
||||
data_types: Any = ...
|
||||
data_types_suffix: Any = ...
|
||||
data_type_check_constraints: Any = ...
|
||||
ops: Any = ...
|
||||
vendor: str = ...
|
||||
display_name: str = ...
|
||||
SchemaEditorClass: Any = ...
|
||||
client_class: Any = ...
|
||||
creation_class: Any = ...
|
||||
features_class: Any = ...
|
||||
introspection_class: Any = ...
|
||||
ops_class: Any = ...
|
||||
validation_class: Any = ...
|
||||
queries_limit: int = ...
|
||||
connection: Any = ...
|
||||
settings_dict: Any = ...
|
||||
alias: Any = ...
|
||||
queries_log: Any = ...
|
||||
force_debug_cursor: bool = ...
|
||||
autocommit: bool = ...
|
||||
in_atomic_block: bool = ...
|
||||
savepoint_state: int = ...
|
||||
savepoint_ids: Any = ...
|
||||
commit_on_exit: bool = ...
|
||||
needs_rollback: bool = ...
|
||||
close_at: Any = ...
|
||||
closed_in_transaction: bool = ...
|
||||
errors_occurred: bool = ...
|
||||
allow_thread_sharing: Any = ...
|
||||
run_on_commit: Any = ...
|
||||
run_commit_hooks_on_set_autocommit_on: bool = ...
|
||||
execute_wrappers: Any = ...
|
||||
client: Any = ...
|
||||
creation: Any = ...
|
||||
features: Any = ...
|
||||
introspection: Any = ...
|
||||
validation: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
settings_dict: Dict[str, Dict[str, str]],
|
||||
alias: str = ...,
|
||||
allow_thread_sharing: bool = ...,
|
||||
) -> None: ...
|
||||
def ensure_timezone(self) -> bool: ...
|
||||
def timezone(self): ...
|
||||
def timezone_name(self): ...
|
||||
@property
|
||||
def queries_logged(self) -> bool: ...
|
||||
@property
|
||||
def queries(self) -> List[Dict[str, str]]: ...
|
||||
def get_connection_params(self) -> None: ...
|
||||
def get_new_connection(self, conn_params: Any) -> None: ...
|
||||
def init_connection_state(self) -> None: ...
|
||||
def create_cursor(self, name: Optional[Any] = ...) -> None: ...
|
||||
def connect(self) -> None: ...
|
||||
def check_settings(self) -> None: ...
|
||||
def ensure_connection(self) -> None: ...
|
||||
def cursor(self) -> CursorWrapper: ...
|
||||
def commit(self) -> None: ...
|
||||
def rollback(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def savepoint(self) -> str: ...
|
||||
def savepoint_rollback(self, sid: str) -> None: ...
|
||||
def savepoint_commit(self, sid: str) -> None: ...
|
||||
def clean_savepoints(self) -> None: ...
|
||||
def get_autocommit(self) -> bool: ...
|
||||
def set_autocommit(
|
||||
self,
|
||||
autocommit: bool,
|
||||
force_begin_transaction_with_broken_autocommit: bool = ...,
|
||||
) -> None: ...
|
||||
def get_rollback(self) -> bool: ...
|
||||
def set_rollback(self, rollback: bool) -> None: ...
|
||||
def validate_no_atomic_block(self) -> None: ...
|
||||
def validate_no_broken_transaction(self) -> None: ...
|
||||
def constraint_checks_disabled(self) -> Iterator[None]: ...
|
||||
def disable_constraint_checking(self): ...
|
||||
def enable_constraint_checking(self) -> None: ...
|
||||
def check_constraints(self, table_names: Optional[Any] = ...) -> None: ...
|
||||
def is_usable(self) -> None: ...
|
||||
def close_if_unusable_or_obsolete(self) -> None: ...
|
||||
def validate_thread_sharing(self) -> None: ...
|
||||
def prepare_database(self) -> None: ...
|
||||
def wrap_database_errors(self) -> DatabaseErrorWrapper: ...
|
||||
def chunked_cursor(self) -> CursorWrapper: ...
|
||||
def make_debug_cursor(
|
||||
self, cursor: SQLiteCursorWrapper
|
||||
) -> CursorDebugWrapper: ...
|
||||
def make_cursor(self, cursor: SQLiteCursorWrapper) -> CursorWrapper: ...
|
||||
def temporary_connection(self) -> None: ...
|
||||
def schema_editor(
|
||||
self, *args: Any, **kwargs: Any
|
||||
) -> DatabaseSchemaEditor: ...
|
||||
def on_commit(self, func: Callable) -> None: ...
|
||||
def run_and_clear_commit_hooks(self) -> None: ...
|
||||
def execute_wrapper(self, wrapper: Callable) -> Iterator[None]: ...
|
||||
def copy(
|
||||
self, alias: None = ..., allow_thread_sharing: None = ...
|
||||
) -> DatabaseWrapper: ...
|
||||
10
django-stubs-generated/db/backends/base/client.pyi
Normal file
10
django-stubs-generated/db/backends/base/client.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.db.backends.base.base import BaseDatabaseWrapper
|
||||
|
||||
|
||||
class BaseDatabaseClient:
|
||||
executable_name: Any = ...
|
||||
connection: Any = ...
|
||||
def __init__(self, connection: BaseDatabaseWrapper) -> None: ...
|
||||
def runshell(self) -> None: ...
|
||||
41
django-stubs-generated/db/backends/base/creation.pyi
Normal file
41
django-stubs-generated/db/backends/base/creation.pyi
Normal file
@@ -0,0 +1,41 @@
|
||||
from typing import Any, Dict, Optional, Tuple, Union
|
||||
|
||||
from django.db.backends.base.base import BaseDatabaseWrapper
|
||||
|
||||
TEST_DATABASE_PREFIX: str
|
||||
|
||||
class BaseDatabaseCreation:
|
||||
connection: django.db.backends.sqlite3.base.DatabaseWrapper = ...
|
||||
def __init__(self, connection: BaseDatabaseWrapper) -> None: ...
|
||||
def create_test_db(
|
||||
self,
|
||||
verbosity: int = ...,
|
||||
autoclobber: bool = ...,
|
||||
serialize: bool = ...,
|
||||
keepdb: bool = ...,
|
||||
) -> str: ...
|
||||
def set_as_test_mirror(
|
||||
self,
|
||||
primary_settings_dict: Dict[
|
||||
str, Optional[Union[Dict[str, None], int, str]]
|
||||
],
|
||||
) -> None: ...
|
||||
def serialize_db_to_string(self) -> str: ...
|
||||
def deserialize_db_from_string(self, data: str) -> None: ...
|
||||
def clone_test_db(
|
||||
self,
|
||||
suffix: Any,
|
||||
verbosity: int = ...,
|
||||
autoclobber: bool = ...,
|
||||
keepdb: bool = ...,
|
||||
) -> None: ...
|
||||
def get_test_db_clone_settings(self, suffix: Any): ...
|
||||
def destroy_test_db(
|
||||
self,
|
||||
old_database_name: str = ...,
|
||||
verbosity: int = ...,
|
||||
keepdb: bool = ...,
|
||||
suffix: None = ...,
|
||||
) -> None: ...
|
||||
def sql_table_creation_suffix(self): ...
|
||||
def test_db_signature(self) -> Tuple[str, str, str, str]: ...
|
||||
101
django-stubs-generated/db/backends/base/features.pyi
Normal file
101
django-stubs-generated/db/backends/base/features.pyi
Normal file
@@ -0,0 +1,101 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.db.backends.base.base import BaseDatabaseWrapper
|
||||
|
||||
|
||||
class BaseDatabaseFeatures:
|
||||
gis_enabled: bool = ...
|
||||
allows_group_by_pk: bool = ...
|
||||
allows_group_by_selected_pks: bool = ...
|
||||
empty_fetchmany_value: Any = ...
|
||||
update_can_self_select: bool = ...
|
||||
interprets_empty_strings_as_nulls: bool = ...
|
||||
supports_nullable_unique_constraints: bool = ...
|
||||
supports_partially_nullable_unique_constraints: bool = ...
|
||||
can_use_chunked_reads: bool = ...
|
||||
can_return_id_from_insert: bool = ...
|
||||
can_return_ids_from_bulk_insert: bool = ...
|
||||
has_bulk_insert: bool = ...
|
||||
uses_savepoints: bool = ...
|
||||
can_release_savepoints: bool = ...
|
||||
related_fields_match_type: bool = ...
|
||||
allow_sliced_subqueries_with_in: bool = ...
|
||||
has_select_for_update: bool = ...
|
||||
has_select_for_update_nowait: bool = ...
|
||||
has_select_for_update_skip_locked: bool = ...
|
||||
has_select_for_update_of: bool = ...
|
||||
select_for_update_of_column: bool = ...
|
||||
test_db_allows_multiple_connections: bool = ...
|
||||
supports_unspecified_pk: bool = ...
|
||||
supports_forward_references: bool = ...
|
||||
truncates_names: bool = ...
|
||||
has_real_datatype: bool = ...
|
||||
supports_subqueries_in_group_by: bool = ...
|
||||
has_native_uuid_field: bool = ...
|
||||
has_native_duration_field: bool = ...
|
||||
supports_temporal_subtraction: bool = ...
|
||||
supports_regex_backreferencing: bool = ...
|
||||
supports_date_lookup_using_string: bool = ...
|
||||
supports_timezones: bool = ...
|
||||
has_zoneinfo_database: bool = ...
|
||||
requires_explicit_null_ordering_when_grouping: bool = ...
|
||||
nulls_order_largest: bool = ...
|
||||
max_query_params: Any = ...
|
||||
allows_auto_pk_0: bool = ...
|
||||
can_defer_constraint_checks: bool = ...
|
||||
supports_mixed_date_datetime_comparisons: bool = ...
|
||||
supports_tablespaces: bool = ...
|
||||
supports_sequence_reset: bool = ...
|
||||
can_introspect_default: bool = ...
|
||||
can_introspect_foreign_keys: bool = ...
|
||||
can_introspect_autofield: bool = ...
|
||||
can_introspect_big_integer_field: bool = ...
|
||||
can_introspect_binary_field: bool = ...
|
||||
can_introspect_decimal_field: bool = ...
|
||||
can_introspect_ip_address_field: bool = ...
|
||||
can_introspect_positive_integer_field: bool = ...
|
||||
can_introspect_small_integer_field: bool = ...
|
||||
can_introspect_time_field: bool = ...
|
||||
introspected_boolean_field_type: str = ...
|
||||
supports_index_column_ordering: bool = ...
|
||||
can_distinct_on_fields: bool = ...
|
||||
autocommits_when_autocommit_is_off: bool = ...
|
||||
atomic_transactions: bool = ...
|
||||
can_rollback_ddl: bool = ...
|
||||
supports_atomic_references_rename: bool = ...
|
||||
supports_combined_alters: bool = ...
|
||||
supports_foreign_keys: bool = ...
|
||||
supports_column_check_constraints: bool = ...
|
||||
supports_paramstyle_pyformat: bool = ...
|
||||
requires_literal_defaults: bool = ...
|
||||
connection_persists_old_columns: bool = ...
|
||||
closed_cursor_error_class: Any = ...
|
||||
has_case_insensitive_like: bool = ...
|
||||
requires_sqlparse_for_splitting: bool = ...
|
||||
bare_select_suffix: str = ...
|
||||
implied_column_null: bool = ...
|
||||
uppercases_column_names: bool = ...
|
||||
supports_select_for_update_with_limit: bool = ...
|
||||
greatest_least_ignores_nulls: bool = ...
|
||||
can_clone_databases: bool = ...
|
||||
ignores_table_name_case: bool = ...
|
||||
for_update_after_from: bool = ...
|
||||
supports_select_union: bool = ...
|
||||
supports_select_intersection: bool = ...
|
||||
supports_select_difference: bool = ...
|
||||
supports_slicing_ordering_in_compound: bool = ...
|
||||
supports_aggregate_filter_clause: bool = ...
|
||||
supports_index_on_text_field: bool = ...
|
||||
supports_over_clause: bool = ...
|
||||
supports_cast_with_precision: bool = ...
|
||||
create_test_procedure_without_params_sql: Any = ...
|
||||
create_test_procedure_with_int_param_sql: Any = ...
|
||||
supports_callproc_kwargs: bool = ...
|
||||
db_functions_convert_bytes_to_str: bool = ...
|
||||
supported_explain_formats: Any = ...
|
||||
validates_explain_options: bool = ...
|
||||
connection: Any = ...
|
||||
def __init__(self, connection: BaseDatabaseWrapper) -> None: ...
|
||||
def supports_explaining_query_execution(self) -> bool: ...
|
||||
def supports_transactions(self): ...
|
||||
def supports_stddev(self): ...
|
||||
38
django-stubs-generated/db/backends/base/introspection.pyi
Normal file
38
django-stubs-generated/db/backends/base/introspection.pyi
Normal file
@@ -0,0 +1,38 @@
|
||||
from collections import namedtuple
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
|
||||
|
||||
from django.db.backends.base.base import BaseDatabaseWrapper
|
||||
from django.db.backends.utils import CursorWrapper
|
||||
from django.db.models.base import Model
|
||||
|
||||
TableInfo = namedtuple("TableInfo", ["name", "type"])
|
||||
|
||||
FieldInfo = namedtuple(
|
||||
"FieldInfo",
|
||||
"name type_code display_size internal_size precision scale null_ok default",
|
||||
)
|
||||
|
||||
class BaseDatabaseIntrospection:
|
||||
data_types_reverse: Any = ...
|
||||
connection: Any = ...
|
||||
def __init__(self, connection: BaseDatabaseWrapper) -> None: ...
|
||||
def get_field_type(
|
||||
self, data_type: str, description: FieldInfo
|
||||
) -> Union[Tuple[str, Dict[str, int]], str]: ...
|
||||
def table_name_converter(self, name: str) -> str: ...
|
||||
def column_name_converter(self, name: str) -> str: ...
|
||||
def table_names(
|
||||
self, cursor: Optional[CursorWrapper] = ..., include_views: bool = ...
|
||||
) -> List[str]: ...
|
||||
def get_table_list(self, cursor: Any) -> None: ...
|
||||
def django_table_names(
|
||||
self, only_existing: bool = ..., include_views: bool = ...
|
||||
) -> List[str]: ...
|
||||
def installed_models(self, tables: List[str]) -> Set[Type[Model]]: ...
|
||||
def sequence_list(self) -> List[Dict[str, str]]: ...
|
||||
def get_sequences(
|
||||
self, cursor: Any, table_name: Any, table_fields: Any = ...
|
||||
) -> None: ...
|
||||
def get_key_columns(self, cursor: Any, table_name: Any) -> None: ...
|
||||
def get_primary_key_column(self, cursor: Any, table_name: Any): ...
|
||||
def get_constraints(self, cursor: Any, table_name: Any) -> None: ...
|
||||
163
django-stubs-generated/db/backends/base/operations.pyi
Normal file
163
django-stubs-generated/db/backends/base/operations.pyi
Normal file
@@ -0,0 +1,163 @@
|
||||
from datetime import date, datetime, timedelta
|
||||
from decimal import Decimal
|
||||
from typing import Any, List, Optional, Set, Tuple, Type, Union, Sequence
|
||||
|
||||
from django.core.management.color import Style
|
||||
from django.db import DefaultConnectionProxy
|
||||
from django.db.backends.base.base import BaseDatabaseWrapper
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
from django.db.backends.utils import CursorWrapper
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.expressions import Case, Expression
|
||||
from django.db.models.fields import Field
|
||||
from django.db.models.sql.compiler import SQLCompiler
|
||||
|
||||
|
||||
class BaseDatabaseOperations:
|
||||
compiler_module: str = ...
|
||||
integer_field_ranges: Any = ...
|
||||
set_operators: Any = ...
|
||||
cast_data_types: Any = ...
|
||||
cast_char_field_without_max_length: Any = ...
|
||||
PRECEDING: str = ...
|
||||
FOLLOWING: str = ...
|
||||
UNBOUNDED_PRECEDING: Any = ...
|
||||
UNBOUNDED_FOLLOWING: Any = ...
|
||||
CURRENT_ROW: str = ...
|
||||
explain_prefix: Any = ...
|
||||
connection: django.db.DefaultConnectionProxy = ...
|
||||
def __init__(
|
||||
self, connection: Union[DefaultConnectionProxy, BaseDatabaseWrapper]
|
||||
) -> None: ...
|
||||
def autoinc_sql(self, table: str, column: str) -> None: ...
|
||||
def bulk_batch_size(self, fields: Any, objs: Any): ...
|
||||
def cache_key_culling_sql(self) -> str: ...
|
||||
def unification_cast_sql(self, output_field: Field) -> str: ...
|
||||
def date_extract_sql(self, lookup_type: None, field_name: None) -> Any: ...
|
||||
def date_interval_sql(self, timedelta: None) -> Any: ...
|
||||
def date_trunc_sql(self, lookup_type: None, field_name: None) -> Any: ...
|
||||
def datetime_cast_date_sql(self, field_name: None, tzname: None) -> Any: ...
|
||||
def datetime_cast_time_sql(self, field_name: None, tzname: None) -> Any: ...
|
||||
def datetime_extract_sql(
|
||||
self, lookup_type: None, field_name: None, tzname: None
|
||||
) -> Any: ...
|
||||
def datetime_trunc_sql(
|
||||
self, lookup_type: None, field_name: None, tzname: None
|
||||
) -> Any: ...
|
||||
def time_trunc_sql(self, lookup_type: None, field_name: None) -> Any: ...
|
||||
def time_extract_sql(self, lookup_type: None, field_name: None) -> Any: ...
|
||||
def deferrable_sql(self) -> str: ...
|
||||
def distinct_sql(
|
||||
self, fields: List[str], params: Optional[List[Any]]
|
||||
) -> Tuple[List[str], List[Any]]: ...
|
||||
def fetch_returned_insert_id(self, cursor: Any): ...
|
||||
def field_cast_sql(
|
||||
self, db_type: Optional[str], internal_type: str
|
||||
) -> str: ...
|
||||
def force_no_ordering(self) -> List[Any]: ...
|
||||
def for_update_sql(
|
||||
self, nowait: bool = ..., skip_locked: bool = ..., of: Any = ...
|
||||
): ...
|
||||
def limit_offset_sql(
|
||||
self, low_mark: int, high_mark: Optional[int]
|
||||
) -> str: ...
|
||||
def last_executed_query(self, cursor: Any, sql: Any, params: Any): ...
|
||||
def last_insert_id(
|
||||
self, cursor: CursorWrapper, table_name: str, pk_name: str
|
||||
) -> int: ...
|
||||
def lookup_cast(
|
||||
self, lookup_type: str, internal_type: str = ...
|
||||
) -> str: ...
|
||||
def max_in_list_size(self) -> None: ...
|
||||
def max_name_length(self) -> None: ...
|
||||
def no_limit_value(self) -> Any: ...
|
||||
def pk_default_value(self) -> str: ...
|
||||
def prepare_sql_script(self, sql: Any): ...
|
||||
def process_clob(self, value: str) -> str: ...
|
||||
def return_insert_id(self) -> None: ...
|
||||
def compiler(self, compiler_name: str) -> Type[SQLCompiler]: ...
|
||||
def quote_name(self, name: str) -> Any: ...
|
||||
def random_function_sql(self): ...
|
||||
def regex_lookup(self, lookup_type: str) -> Any: ...
|
||||
def savepoint_create_sql(self, sid: str) -> str: ...
|
||||
def savepoint_commit_sql(self, sid: str) -> str: ...
|
||||
def savepoint_rollback_sql(self, sid: str) -> str: ...
|
||||
def set_time_zone_sql(self) -> str: ...
|
||||
def sql_flush(
|
||||
self,
|
||||
style: None,
|
||||
tables: None,
|
||||
sequences: None,
|
||||
allow_cascade: bool = ...,
|
||||
) -> Any: ...
|
||||
def execute_sql_flush(self, using: str, sql_list: List[str]) -> None: ...
|
||||
def sequence_reset_by_name_sql(
|
||||
self, style: None, sequences: List[Any]
|
||||
) -> List[Any]: ...
|
||||
def sequence_reset_sql(
|
||||
self,
|
||||
style: Style,
|
||||
model_list: Sequence[Type[Model]],
|
||||
) -> List[Any]: ...
|
||||
def start_transaction_sql(self) -> str: ...
|
||||
def end_transaction_sql(self, success: bool = ...) -> str: ...
|
||||
def tablespace_sql(
|
||||
self, tablespace: Optional[str], inline: bool = ...
|
||||
) -> str: ...
|
||||
def prep_for_like_query(self, x: str) -> str: ...
|
||||
prep_for_iexact_query: Any = ...
|
||||
def validate_autopk_value(self, value: int) -> int: ...
|
||||
def adapt_unknown_value(
|
||||
self, value: Union[datetime, Decimal, int, str]
|
||||
) -> Union[int, str]: ...
|
||||
def adapt_datefield_value(self, value: Optional[date]) -> Optional[str]: ...
|
||||
def adapt_datetimefield_value(self, value: None) -> None: ...
|
||||
def adapt_timefield_value(
|
||||
self, value: Optional[datetime]
|
||||
) -> Optional[str]: ...
|
||||
def adapt_decimalfield_value(
|
||||
self,
|
||||
value: Optional[Decimal],
|
||||
max_digits: Optional[int] = ...,
|
||||
decimal_places: Optional[int] = ...,
|
||||
) -> Optional[str]: ...
|
||||
def adapt_ipaddressfield_value(
|
||||
self, value: Optional[str]
|
||||
) -> Optional[str]: ...
|
||||
def year_lookup_bounds_for_date_field(self, value: int) -> List[str]: ...
|
||||
def year_lookup_bounds_for_datetime_field(
|
||||
self, value: int
|
||||
) -> List[str]: ...
|
||||
def get_db_converters(self, expression: Expression) -> List[Any]: ...
|
||||
def convert_durationfield_value(
|
||||
self,
|
||||
value: Optional[float],
|
||||
expression: Expression,
|
||||
connection: DatabaseWrapper,
|
||||
) -> Optional[timedelta]: ...
|
||||
def check_expression_support(self, expression: Any) -> None: ...
|
||||
def combine_expression(
|
||||
self, connector: str, sub_expressions: List[str]
|
||||
) -> str: ...
|
||||
def combine_duration_expression(
|
||||
self, connector: Any, sub_expressions: Any
|
||||
): ...
|
||||
def binary_placeholder_sql(self, value: Optional[Case]) -> str: ...
|
||||
def modify_insert_params(
|
||||
self,
|
||||
placeholder: str,
|
||||
params: Union[List[None], List[bool], List[float], List[str]],
|
||||
) -> Union[List[None], List[bool], List[float], List[str]]: ...
|
||||
def integer_field_range(self, internal_type: Any): ...
|
||||
def subtract_temporals(self, internal_type: Any, lhs: Any, rhs: Any): ...
|
||||
def window_frame_start(self, start: Any): ...
|
||||
def window_frame_end(self, end: Any): ...
|
||||
def window_frame_rows_start_end(
|
||||
self, start: None = ..., end: None = ...
|
||||
) -> Any: ...
|
||||
def window_frame_range_start_end(
|
||||
self, start: Optional[Any] = ..., end: Optional[Any] = ...
|
||||
): ...
|
||||
def explain_query_prefix(
|
||||
self, format: Optional[str] = ..., **options: Any
|
||||
) -> str: ...
|
||||
101
django-stubs-generated/db/backends/base/schema.pyi
Normal file
101
django-stubs-generated/db/backends/base/schema.pyi
Normal file
@@ -0,0 +1,101 @@
|
||||
from typing import Any, List, Optional, Tuple, Type, Union
|
||||
|
||||
from django.db.backends.ddl_references import Statement
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.fields import Field
|
||||
from django.db.models.indexes import Index
|
||||
|
||||
logger: Any
|
||||
|
||||
class BaseDatabaseSchemaEditor:
|
||||
sql_create_table: str = ...
|
||||
sql_rename_table: str = ...
|
||||
sql_retablespace_table: str = ...
|
||||
sql_delete_table: str = ...
|
||||
sql_create_column: str = ...
|
||||
sql_alter_column: str = ...
|
||||
sql_alter_column_type: str = ...
|
||||
sql_alter_column_null: str = ...
|
||||
sql_alter_column_not_null: str = ...
|
||||
sql_alter_column_default: str = ...
|
||||
sql_alter_column_no_default: str = ...
|
||||
sql_delete_column: str = ...
|
||||
sql_rename_column: str = ...
|
||||
sql_update_with_default: str = ...
|
||||
sql_create_check: str = ...
|
||||
sql_delete_check: str = ...
|
||||
sql_create_unique: str = ...
|
||||
sql_delete_unique: str = ...
|
||||
sql_create_fk: str = ...
|
||||
sql_create_inline_fk: Any = ...
|
||||
sql_delete_fk: str = ...
|
||||
sql_create_index: str = ...
|
||||
sql_delete_index: str = ...
|
||||
sql_create_pk: str = ...
|
||||
sql_delete_pk: str = ...
|
||||
sql_delete_procedure: str = ...
|
||||
connection: Any = ...
|
||||
collect_sql: Any = ...
|
||||
collected_sql: Any = ...
|
||||
atomic_migration: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
connection: DatabaseWrapper,
|
||||
collect_sql: bool = ...,
|
||||
atomic: bool = ...,
|
||||
) -> None: ...
|
||||
deferred_sql: Any = ...
|
||||
atomic: Any = ...
|
||||
def __enter__(self) -> DatabaseSchemaEditor: ...
|
||||
def __exit__(
|
||||
self, exc_type: None, exc_value: None, traceback: None
|
||||
) -> None: ...
|
||||
def execute(
|
||||
self,
|
||||
sql: Union[Statement, str],
|
||||
params: Optional[Union[List[int], Tuple]] = ...,
|
||||
) -> None: ...
|
||||
def quote_name(self, name: str) -> str: ...
|
||||
def column_sql(
|
||||
self, model: Type[Model], field: Field, include_default: bool = ...
|
||||
) -> Union[Tuple[None, None], Tuple[str, List[Any]]]: ...
|
||||
def skip_default(self, field: Any): ...
|
||||
def prepare_default(self, value: Any) -> None: ...
|
||||
def effective_default(self, field: Field) -> Optional[Union[int, str]]: ...
|
||||
def quote_value(self, value: Any) -> None: ...
|
||||
def create_model(self, model: Type[Model]) -> None: ...
|
||||
def delete_model(self, model: Type[Model]) -> None: ...
|
||||
def add_index(self, model: Type[Model], index: Index) -> None: ...
|
||||
def remove_index(self, model: Type[Model], index: Index) -> None: ...
|
||||
def alter_unique_together(
|
||||
self,
|
||||
model: Type[Model],
|
||||
old_unique_together: Union[List[List[str]], Tuple[Tuple[str, str]]],
|
||||
new_unique_together: Union[List[List[str]], Tuple[Tuple[str, str]]],
|
||||
) -> None: ...
|
||||
def alter_index_together(
|
||||
self,
|
||||
model: Type[Model],
|
||||
old_index_together: Union[List[List[str]], List[Tuple[str, str]]],
|
||||
new_index_together: Union[List[List[str]], List[Tuple[str, str]]],
|
||||
) -> None: ...
|
||||
def alter_db_table(
|
||||
self, model: Type[Model], old_db_table: str, new_db_table: str
|
||||
) -> None: ...
|
||||
def alter_db_tablespace(
|
||||
self, model: Any, old_db_tablespace: Any, new_db_tablespace: Any
|
||||
) -> None: ...
|
||||
def add_field(self, model: Any, field: Any): ...
|
||||
def remove_field(self, model: Any, field: Any): ...
|
||||
def alter_field(
|
||||
self,
|
||||
model: Type[Model],
|
||||
old_field: Field,
|
||||
new_field: Field,
|
||||
strict: bool = ...,
|
||||
) -> None: ...
|
||||
def remove_procedure(
|
||||
self, procedure_name: Any, param_types: Any = ...
|
||||
) -> None: ...
|
||||
11
django-stubs-generated/db/backends/base/validation.pyi
Normal file
11
django-stubs-generated/db/backends/base/validation.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from django.db.backends.base.base import BaseDatabaseWrapper
|
||||
from django.db.models.fields import Field
|
||||
|
||||
|
||||
class BaseDatabaseValidation:
|
||||
connection: django.db.backends.sqlite3.base.DatabaseWrapper = ...
|
||||
def __init__(self, connection: BaseDatabaseWrapper) -> None: ...
|
||||
def check(self, **kwargs: Any) -> List[Any]: ...
|
||||
def check_field(self, field: Field, **kwargs: Any) -> List[Any]: ...
|
||||
Reference in New Issue
Block a user