MCPcopy Create free account

hub / github.com/tortoise/tortoise-orm / functions

Functions3,850 in github.com/tortoise/tortoise-orm

↓ 3 callersMethod_create_fk_string
( self, constraint_name: str, db_column: str, table: str, field: str,
tortoise/backends/base/schema_generator.py:68
↓ 3 callersMethod_create_string
( self, db_column: str, field_type: str, nullable: str, unique: str,
tortoise/backends/base/schema_generator.py:46
↓ 3 callersMethod_discover_client_class
(self, db_info: dict)
tortoise/connection.py:115
↓ 3 callersFunction_echo_connection_header
(connection_name: str, *, suffix: str = "")
tortoise/cli/cli.py:288
↓ 3 callersMethod_execute_prefetch_queries
(self, instance_list: Iterable[Model])
tortoise/backends/base/executor.py:727
↓ 3 callersMethod_find_index
(self, model_state: ModelState)
tortoise/migrations/operations.py:703
↓ 3 callersMethod_generate_fk_name
( self, from_table: str, from_field: str, to_table: str, to_field: str )
tortoise/migrations/schema_editor/base.py:161
↓ 3 callersMethod_get_column_comment_sql
(self, table: str, column: str, comment: str)
tortoise/migrations/schema_editor/base.py:81
↓ 3 callersFunction_get_db_config
Get database config and check if it's MySQL.
tests/backends/test_mysql.py:15
↓ 3 callersMethod_get_db_info
(self, conn_alias: str)
tortoise/connection.py:130
↓ 3 callersMethod_get_fk_reference_string
( self, constraint_name: str, db_field: str, table: str, field: str,
tortoise/migrations/schema_editor/base.py:117
↓ 3 callersMethod_get_m2m_table_definition
( self, model: type[Model], field: ManyToManyFieldInstance )
tortoise/migrations/schema_editor/base.py:226
↓ 3 callersMethod_get_model_sql_data
(self, model: type[Model])
tortoise/migrations/schema_editor/base.py:310
↓ 3 callersFunction_get_or_parse_timezone
If timezone is None return get_default_timezone() else if timezone is tzinfo object, return it; else parse string to ZoneInfo instance.
tortoise/timezone.py:89
↓ 3 callersFunction_get_table
(model: type[Model])
tests/test_model_get_table.py:23
↓ 3 callersMethod_get_unique_constraint_names_from_db
Query the database for unique constraint names on an exact set of columns. Returns constraint names whose column set matches ``column_names``
tortoise/migrations/schema_editor/base.py:767
↓ 3 callersMethod_get_unique_index_sql
( self, table_name: str, field_names: list[str], schema: str | None = None )
tortoise/migrations/schema_editor/base.py:213
↓ 3 callersMethod_init_config
(self, db_config: DBConfigType, create_db: bool = False)
tortoise/connection.py:88
↓ 3 callersMethod_init_connections
(self)
tortoise/connection.py:139
↓ 3 callersMethod_leaf_nodes
(self, app_label: str)
tortoise/migrations/autodetector.py:138
↓ 3 callersMethod_make_hash
(*args: str, length: int)
tortoise/migrations/schema_editor/base.py:158
↓ 3 callersFunction_model_options_for_compare
(options: dict[str, object])
tortoise/migrations/schema_generator/state_diff.py:81
↓ 3 callersMethod_parse_orderings
Convert ordering from strings to standard items for queryset. :param orderings: What columns/order to order by :param revers
tortoise/queryset.py:445
↓ 3 callersMethod_prepare_insert_columns
( self, include_generated: bool = False )
tortoise/backends/base/executor.py:157
↓ 3 callersFunction_prepare_migration_package
(tmp_path: Path, app_label: str)
tests/migrations/test_autodetector.py:17
↓ 3 callersMethod_project_state
( self, applied: set[MigrationKey], *, upto: MigrationKey | None = None )
tortoise/migrations/executor.py:218
↓ 3 callersFunction_render_call
(path: str, args: list[Any], kwargs: dict[str, Any], imports: ImportManager)
tortoise/migrations/writer.py:222
↓ 3 callersMethod_render_field
(self, field: Any, imports: ImportManager)
tortoise/migrations/writer.py:441
↓ 3 callersFunction_require_app_label
(model: type[Model])
tortoise/migrations/schema_generator/state.py:124
↓ 3 callersMethod_reset_apps
Internal: Reset Apps registry on current context.
tortoise/__init__.py:500
↓ 3 callersMethod_resolve_constraint_name
Resolve the actual constraint name via introspection, falling back to deterministic name. Tries database introspection first to discover the
tortoise/migrations/schema_editor/base.py:778
↓ 3 callersFunction_run_migrate
( ctx: CLIContext, app_label: str | None, migration: str | None, *, fake: bool, dry_ru
tortoise/cli/cli.py:510
↓ 3 callersFunction_select_query
()
tests/test_query_api.py:188
↓ 3 callersMethod_set_result_for_query
(self, sequence: list[MODEL], attr: str | None = None)
tortoise/fields/relational.py:154
↓ 3 callersFunction_write_migration_with_ops
( tmp_path: Path, app_label: str, name: str, operations_source: list[str], dependencies: l
tests/migrations/test_autodetector.py:47
↓ 3 callersMethodacquire_connection
(self)
tortoise/backends/odbc/client.py:121
↓ 3 callersMethodadd_constraint
(self, model, constraint)
tortoise/migrations/schema_editor/sqlite.py:144
↓ 3 callersFunctionassert_list_sort_equal
Assert two lists are equal after sorting by the given key.
tests/test_bulk.py:12
↓ 3 callersMethodclose_orm
(self)
tortoise/contrib/fastapi/__init__.py:183
↓ 3 callersMethodcommit
(self)
tortoise/backends/sqlite/client.py:250
↓ 3 callersMethodcreate_connection
(self, with_db: bool)
tortoise/backends/mysql/client.py:111
↓ 3 callersMethodcreate_connection
Establish a DB connection. :param with_db: If True, then select the DB to use, else use default. Use case for this is to
tortoise/backends/base/client.py:150
↓ 3 callersMethodcreate_schema
Create a database schema. Override in dialect-specific editors. The default implementation is a no-op, suitable for backends that do
tortoise/migrations/schema_editor/base.py:457
↓ 3 callersMethoddatabase_backward
( self, app_label: str, old_state: State, new_state: State, state_edit
tortoise/migrations/operations.py:1243
↓ 3 callersMethoddeconstruct
(self)
tortoise/migrations/constraints.py:25
↓ 3 callersMethoddescribe
(self)
tortoise/migrations/operations.py:1226
↓ 3 callersMethoddescribe_models
Describes the given list of models or ALL registered models. :param models: List of models to describe, if not provided
tortoise/__init__.py:172
↓ 3 callersFunctionescape_item
(val: Any, mapping=None)
tortoise/converters.py:31
↓ 3 callersMethodexecute_script
(self, query: str)
tortoise/backends/oracle/client.py:83
↓ 3 callersMethodexecute_script
(self, query: str)
tortoise/backends/mysql/client.py:228
↓ 3 callersFunctionexpand_lookup_expression
(root_model: type[Model], lookup_expression: str)
tortoise/query_utils.py:88
↓ 3 callersMethodfetch_for_list
Fetches related models for provided list of Model objects. :param instance_list: List of Model objects to fetch relations for.
tortoise/models.py:1625
↓ 3 callersMethodfilter
Filters QuerySet by given kwargs. You can filter by related objects like this: .. code-block:: python3 Team.filter(even
tortoise/queryset.py:427
↓ 3 callersMethodfinalise_fields
(self)
tortoise/models.py:326
↓ 3 callersFunctiongen_many_fields_data
()
tests/benchmarks/conftest.py:57
↓ 3 callersMethodget
Fetch exactly one object matching the parameters.
tortoise/queryset.py:851
↓ 3 callersFunctionget_m2m_filters
(field_name: str, field: ManyToManyFieldInstance)
tortoise/filters.py:283
↓ 3 callersFunctionget_related_models
(model: type[Model])
tortoise/migrations/schema_generator/state.py:108
↓ 3 callersFunctioninit_apps
(*models: type[Model])
tests/migrations/test_schema_editor_backends.py:29
↓ 3 callersFunctionlocaltime
Convert an aware datetime.datetime to local time. Only aware datetime are allowed. When value is omitted, it defaults to now(). Loc
tortoise/timezone.py:100
↓ 3 callersMethodnegate
Negates the current Q object. (mutation)
tortoise/expressions.py:329
↓ 3 callersFunctionpydantic_queryset_creator
Function to build a `Pydantic Model <https://docs.pydantic.dev/latest/concepts/models/>`__ list off Tortoise Model. :param cls: The Tortoise
tortoise/contrib/pydantic/creator.py:128
↓ 3 callersMethodquote
(self, val: str)
tortoise/schema_quoting.py:18
↓ 3 callersMethodrecord_applied
(self, app: str, name: str)
tortoise/migrations/recorder.py:76
↓ 3 callersMethodrecord_unapplied
(self, app: str, name: str)
tortoise/migrations/recorder.py:85
↓ 3 callersMethodremove_field
(self, model: type[Model], field: Field)
tortoise/migrations/schema_editor/base.py:714
↓ 3 callersMethodrename_constraint
( self, model: type[Model], old_constraint: UniqueConstraint | CheckConstraint,
tortoise/migrations/schema_editor/base.py:896
↓ 3 callersMethodrename_index
(self, model: type[Model], old_index: Index, new_index: Index)
tortoise/migrations/schema_editor/base.py:825
↓ 3 callersMethodrender
(self, apps: StateApps, *, deepcopy_fields: bool = True)
tortoise/migrations/schema_generator/state.py:47
↓ 3 callersFunctionrun
()
tests/contrib/test_decorator.py:39
↓ 3 callersFunctionskip_if_not_postgres
Skip test if not running against PostgreSQL.
tests/contrib/postgres/conftest.py:16
↓ 3 callersMethodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:312
↓ 3 callersMethodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:1229
↓ 3 callersFunctiontortoise_exception_handlers
()
tortoise/contrib/fastapi/__init__.py:27
↓ 3 callersMethodunregister_model
(self, app_label: str, model_name: str)
tortoise/migrations/schema_generator/state_apps.py:113
↓ 3 callersMethodvalidate_relations_initialized
Verify that all registered models have had their relations fully initialized. Raises ``RuntimeError`` if any model still has ``_inited = Fals
tortoise/migrations/schema_generator/state.py:198
↓ 2 callersFunctionIntEnumField
Enum Field A field representing an integer enumeration. The description of the field is set automatically if not specified to a multili
tortoise/fields/data.py:919
↓ 2 callersMethod__aenter__
Enter the async context manager and set this context as current. Returns: This context instance.
tortoise/context.py:505
↓ 2 callersMethod__aexit__
Exit the async context manager, close connections, and restore previous context.
tortoise/context.py:515
↓ 2 callersMethod__aexit__
(self, exc_type: Any, exc_val: Any, exc_tb: Any)
tortoise/backends/base/client.py:305
↓ 2 callersMethod__init__
(self, *columns: Term)
tortoise/contrib/mysql/search.py:24
↓ 2 callersMethod__init__
(self, _apps, apps_config, **_kwargs)
tests/cli/test_cli.py:482
↓ 2 callersMethod_analyze_db_default_fields
Classify each db_default field across all instances. Returns a set of field names to omit from the INSERT (all instances use Database
tortoise/queryset.py:2039
↓ 2 callersMethod_and_criterion
(self)
tortoise/query_utils.py:209
↓ 2 callersMethod_backward_plan
( self, target: MigrationTarget, applied: set[MigrationKey], graph: MigrationG
tortoise/migrations/executor.py:321
↓ 2 callersFunction_bench
()
tests/benchmarks/test_get.py:14
↓ 2 callersFunction_bench
()
tests/benchmarks/test_filter.py:14
↓ 2 callersFunction_bench
()
tests/benchmarks/test_bulk_create.py:20
↓ 2 callersFunction_bench
()
tests/benchmarks/test_expressions.py:13
↓ 2 callersFunction_bench
()
tests/benchmarks/test_create.py:12
↓ 2 callersFunction_br_it
(val: str)
tortoise/contrib/pydantic/creator.py:57
↓ 2 callersMethod_build_initial_querysets
(self)
tortoise/migrations/schema_generator/state_apps.py:93
↓ 2 callersMethod_build_insert_with_defaults
Build an INSERT query where DatabaseDefault fields are omitted. Returns ``(sql_string, values_list, db_default_columns)`` where: - *v
tortoise/backends/base/executor.py:199
↓ 2 callersFunction_build_migrations
(num_models: int, batch_size: int = 20)
tests/migrations/test_state_performance.py:34
↓ 2 callersMethod_build_modify_column_sql
Build a complete MODIFY COLUMN clause including DEFAULT and COMMENT.
tortoise/migrations/schema_editor/mysql.py:290
↓ 2 callersMethod_check_key
(self, key: MigrationKey, current_app: str)
tortoise/migrations/loader.py:89
↓ 2 callersMethod_check_together
Check the value of "unique_together" option. :raises ConfigurationError: If the model has not been configured correctly.
tortoise/models.py:1652
↓ 2 callersMethod_choose_db
Return the connection that will be used if this query is executed now. :return: BaseDBAsyncClient:
tortoise/queryset.py:116
↓ 2 callersMethod_collect_schemas
Collect all unique schema names used in a state.
tortoise/migrations/schema_generator/operation_generator.py:111
↓ 2 callersMethod_column_default_generator
( self, table: str, column: str, default: Any, )
tortoise/backends/base/schema_generator.py:86
← previousnext →301–400 of 3,850, ranked by callers