MCPcopy Create free account

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

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

↓ 6 callersMethodget
Return the connection object for the given alias, creating it if needed. If the connection's event loop has changed (e.g., in a test
tortoise/connection.py:155
↓ 6 callersFunctionget_joins_for_related_field
( table: Table, related_field: RelationalField, related_field_name: str )
tortoise/query_utils.py:32
↓ 6 callersMethodget_models_iterable
(self)
tortoise/apps.py:320
↓ 6 callersMethodget_sql
(self, _context=None, dialect: str | None = None)
tortoise/fields/db_defaults.py:59
↓ 6 callersMethodmake_from_model
(cls, app_label: str, model: type[Model])
tortoise/migrations/schema_generator/state.py:61
↓ 6 callersMethodmigrate
( self, targets: Iterable[MigrationTarget] | None = None, *, fake: bool = Fals
tortoise/migrations/executor.py:47
↓ 6 callersMethodplan
(self, targets: Iterable[MigrationTarget] | None = None)
tortoise/migrations/executor.py:123
↓ 6 callersMethodreload_models
(self, model_tuples: Iterable[tuple[str, str]])
tortoise/migrations/schema_generator/state.py:186
↓ 6 callersFunctionrequire_context
Get the currently active TortoiseContext, raising if none is active. Returns: The current TortoiseContext. Raises: Runt
tortoise/context.py:99
↓ 6 callersMethodrollback
(self)
tortoise/backends/mysql/client.py:276
↓ 6 callersMethodselect_for_update
Make QuerySet select for update. Returns a queryset that will lock rows until the end of the transaction, generating a SELEC
tortoise/models.py:1321
↓ 5 callersMethod__setattr__
(self, attr: str, value: Any)
tortoise/backends/base/client.py:85
↓ 5 callersMethod_generate_index_name_for_table
( self, prefix: str, table_name: str, field_names: list[str] )
tortoise/migrations/schema_editor/base.py:172
↓ 5 callersMethod_get_config_from_config_file
(cls, config_file: str)
tortoise/__init__.py:275
↓ 5 callersMethod_get_index_sql
( self, model: type[Model], field_names: list[str], safe: bool = False,
tortoise/migrations/schema_editor/base.py:196
↓ 5 callersMethod_index_name_for_model
(self, model: type[Model], index: Index)
tortoise/migrations/schema_editor/base.py:737
↓ 5 callersMethod_init_from_db
(cls: type[MODEL], **kwargs: Any)
tortoise/models.py:813
↓ 5 callersFunction_make_m2m_models_with_schema
Build M2M models with Meta.schema for through_schema testing.
tests/migrations/test_schema_qualified_migrations.py:673
↓ 5 callersMethod_make_query
(self)
tortoise/queryset.py:1193
↓ 5 callersMethod_post_connect
Called after pool/connection is created. Records the bound loop.
tortoise/backends/base/client.py:146
↓ 5 callersMethod_raise_if_not_fetched
(self)
tortoise/fields/relational.py:160
↓ 5 callersFunction_run_shell
(cmd: str, **kw)
tests/test_version.py:42
↓ 5 callersMethod_run_sql
Execute SQL statements using the schema editor.
tortoise/migrations/operations.py:1256
↓ 5 callersFunction_test_index_alias_for_field
Helper function to test index alias behavior for a given field class.
tests/fields/test_db_index.py:67
↓ 5 callersMethodacquire_connection
(self)
tortoise/backends/asyncpg/client.py:183
↓ 5 callersMethodadd_index
(self, model: type[Model], index: Index)
tortoise/migrations/schema_editor/base.py:804
↓ 5 callersFunctionassert_raises_wrong_type_exception
Context manager that asserts ValidationError with wrong type message.
tests/fields/test_fk.py:13
↓ 5 callersMethoddescribe
(self, serializable: bool)
tortoise/fields/data.py:516
↓ 5 callersMethodexecute_insert
(self, query: str, values: list)
tortoise/backends/mssql/client.py:64
↓ 5 callersMethodfield_map_update
(self, fields: list[Field], meta: PydanticMetaData)
tortoise/contrib/pydantic/creator.py:99
↓ 5 callersMethodfrom_queryset
Returns a serializable pydantic model instance that contains a list of models, from the provided queryset. This will prefetc
tortoise/contrib/pydantic/base.py:114
↓ 5 callersMethodgenerate_schemas
Generate database schemas for all models in this context. Args: safe: When True, creates tables only if they don't alrea
tortoise/context.py:399
↓ 5 callersMethodget_sql
(self, _context=None, dialect: str | None = None)
tortoise/fields/db_defaults.py:89
↓ 5 callersMethodinit_models
Early initialisation of Tortoise ORM Models. Initialise the relationships between Models. This does not initialise any datab
tortoise/__init__.py:213
↓ 5 callersMethodremove_index
(self, model: type[Model], index: Index)
tortoise/migrations/schema_editor/base.py:816
↓ 5 callersMethodrename_table
(self, model: type[Model], old_name: str, new_name: str)
tortoise/migrations/schema_editor/base.py:474
↓ 5 callersMethodreset
Reset the connection storage to the previous context state. Restores the connection state for all aliases to what it was before the
tortoise/connection.py:229
↓ 5 callersMethodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:457
↓ 5 callersFunctiontortoise_cli_context
( config: dict[str, Any] | TortoiseConfig, )
tortoise/cli/cli.py:152
↓ 5 callersMethodunapply
( self, state: State, *, dry_run: bool = False, schema_editor: BaseSch
tortoise/migrations/migration.py:85
↓ 4 callersMethod_as_single
(self)
tortoise/queryset.py:484
↓ 4 callersFunction_bench
()
tests/benchmarks/test_update.py:12
↓ 4 callersMethod_combine
( self, other: SearchQueryCombinable, operator: str, reversed: bool )
tortoise/contrib/postgres/search.py:178
↓ 4 callersMethod_combine
(self, other: LexemeCombinable, operator: str, reversed: bool)
tortoise/contrib/postgres/search.py:392
↓ 4 callersFunction_create
()
tests/benchmarks/conftest.py:35
↓ 4 callersMethod_create_connection
(self, conn_alias: str)
tortoise/connection.py:145
↓ 4 callersMethod_emit
( progress: Callable[[str, str, str], object] | None, event: str, key: MigrationKey,
tortoise/migrations/executor.py:129
↓ 4 callersMethod_escape
(value: str)
tortoise/migrations/recorder.py:94
↓ 4 callersMethod_expire_connections
(self)
tortoise/backends/odbc/client.py:99
↓ 4 callersFunction_get_db_config
Get database config and check if it's PostgreSQL.
tests/backends/test_postgres.py:16
↓ 4 callersFunction_get_fetch_fields
Recursively collect fields needed to fetch :param pydantic_class: The pydantic model class :param model_class: The tortoise model class
tortoise/contrib/pydantic/base.py:20
↓ 4 callersMethod_get_index_name
( self, prefix: str, model: type[Model] | str, field_names: Sequence[str] )
tortoise/backends/base/schema_generator.py:155
↓ 4 callersMethod_in_transaction
(self)
tests/utils/fake_client.py:35
↓ 4 callersMethod_join_table_by_field
( self, table: Table, related_field_name: str, related_field: RelationalField )
tortoise/queryset.py:162
↓ 4 callersFunction_normalize_constraints
(value: object)
tortoise/migrations/schema_generator/state_diff.py:56
↓ 4 callersFunction_normalize_unique_together
(value: object)
tortoise/migrations/schema_generator/state_diff.py:50
↓ 4 callersFunction_override_tortoise_apps
Temporarily replace Tortoise.apps, bypassing the metaclass protection. Uses type.__setattr__ to bypass _TortoiseMeta.__setattr__ which preven
tests/cli/test_cli.py:23
↓ 4 callersMethod_post_table_hook
(self)
tortoise/migrations/schema_editor/base.py:94
↓ 4 callersMethod_prepare_insert_statement
( self, columns: Sequence[str], has_generated: bool = True, ignore_conflicts: bool = False )
tortoise/backends/base/executor.py:168
↓ 4 callersMethod_remake_table
Recreate a table with modified schema (SQLite's recommended ALTER TABLE approach).
tortoise/migrations/schema_editor/sqlite.py:243
↓ 4 callersFunction_resolve_import
(value: Any)
tortoise/migrations/writer.py:104
↓ 4 callersMethod_schema_editor
(self, atomic: bool = True, collect_sql: bool = False)
tortoise/migrations/executor.py:137
↓ 4 callersFunction_select_apps
Select specific apps from config, or all if no labels specified.
tortoise/cli/cli.py:191
↓ 4 callersMethod_table_generate_extra
(self, table: str)
tortoise/migrations/schema_editor/base.py:91
↓ 4 callersMethod_validate_type
(self, value: Any)
tortoise/validators.py:69
↓ 4 callersMethod_wait_for_listeners
(self, signal: Signals, *listener_args)
tortoise/models.py:1104
↓ 4 callersFunction_write_migrations
(pkg: Path, migration_names: list[str])
tests/cli/test_cli.py:45
↓ 4 callersMethodacquire
(self, *args, **kwargs)
tortoise/backends/psycopg/client.py:30
↓ 4 callersMethodclose
(self)
tortoise/backends/mysql/client.py:164
↓ 4 callersMethodcommit
(self)
tortoise/backends/mysql/client.py:264
↓ 4 callersMethodcreate_connection
(self, with_db: bool)
tortoise/backends/odbc/client.py:78
↓ 4 callersMethodcreate_connection
(self, with_db: bool)
tests/utils/fake_client.py:20
↓ 4 callersMethodcreate_pool
(self, **kwargs)
tortoise/backends/psycopg/client.py:114
↓ 4 callersMethoddelete_model
(self, model: type[Model])
tortoise/migrations/schema_editor/base.py:485
↓ 4 callersMethodexecute_query_dict
(self, query: str, values: list | None = None)
tortoise/backends/odbc/client.py:157
↓ 4 callersMethodfilter
Returns a QuerySet with related elements filtered by args/kwargs.
tortoise/fields/relational.py:92
↓ 4 callersMethodfrom_dict
(cls, data: Mapping[str, Any])
tortoise/config.py:88
↓ 4 callersMethodfull_hierarchy__async_for
Demonstrates ``async for` to fetch relations An async iterator will fetch the relationship on-demand.
tests/testmodels.py:619
↓ 4 callersMethodfull_hierarchy__fetch_related
Demonstrates ``await .fetch_related`` to fetch relations On prefetching the data, the relationship files will contain a regular list
tests/testmodels.py:637
↓ 4 callersMethodfull_hierarchy__fetch_related
Demonstrates ``await .fetch_related`` to fetch relations On prefetching the data, the relationship files will contain a regular list
examples/relations_recursive.py:50
↓ 4 callersMethodget_db_default_value
Return a DatabaseDefault instance if this field has a db_default, else None.
tortoise/fields/base.py:362
↓ 4 callersFunctionget_filters_for_field
( field_name: str, field: Field | None, source_field: str )
tortoise/filters.py:463
↓ 4 callersFunctioninit_apps
(*models: type[Model])
tests/migrations/test_schema_qualified_migrations.py:47
↓ 4 callersMethodrefresh_from_db
Refresh latest data from db. When this method is called without arguments all db fields of the model are updated to the values curren
tortoise/models.py:1225
↓ 4 callersMethodregister_listener
Register listener to current model class for special Signal. :param signal: one of tortoise.signals.Signals :param listener:
tortoise/models.py:1082
↓ 4 callersMethodrelease
(self, connection: psycopg.AsyncConnection)
tortoise/backends/psycopg/client.py:33
↓ 4 callersMethodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:234
↓ 4 callersMethodupdate_from_dict
Updates the current model with the provided dict. This can allow mass-updating a model from a dict, also ensuring that datatype conve
tortoise/models.py:1063
↓ 3 callersMethod__get__
(self, instance: None, owner: type[Model])
tortoise/fields/base.py:209
↓ 3 callersMethod__init__
(self, name: str)
tortoise/expressions.py:128
↓ 3 callersMethod__init__
(self, alias=None)
tortoise/contrib/postgres/functions.py:38
↓ 3 callersMethod__init__
( self, value: str, invert: bool = False, prefix: bool = False, weight
tortoise/contrib/postgres/search.py:422
↓ 3 callersMethod__new__
(cls, name: str, bases: tuple[type, ...], attrs: dict[str, Any])
tortoise/models.py:507
↓ 3 callersMethod__new__
(cls, *args: Any, **kwargs: Any)
tortoise/fields/base.py:205
↓ 3 callersFunction_and
(left: Criterion, right: Criterion)
tortoise/query_utils.py:175
↓ 3 callersMethod_as_tsquery
(self)
tortoise/contrib/postgres/search.py:440
↓ 3 callersFunction_build_state_with_schema_model
Add a model with optional schema to a state.
tests/migrations/test_schema_qualified_migrations.py:392
↓ 3 callersMethod_check_loop
(self)
tests/test_query_api.py:283
↓ 3 callersFunction_cleandoc
(obj: Any)
tortoise/contrib/pydantic/creator.py:61
↓ 3 callersMethod_copy_storage
Return a shallow copy of the storage.
tortoise/connection.py:72
← previousnext →201–300 of 3,850, ranked by callers