Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tortoise/tortoise-orm
/ functions
Functions
3,850 in github.com/tortoise/tortoise-orm
⨍
Functions
3,850
◇
Types & classes
935
↳
Endpoints
102
Function
test_topological_sort_children_before_parents
Event (FK→Tournament) must come before Tournament in delete order.
tests/test_truncate.py:19
Function
test_topological_sort_input_order_independent
Result must be the same regardless of input order.
tests/test_truncate.py:26
Function
test_topological_sort_multi_level_chain
MinRelation→Tournament and MinRelation→Team: MinRelation before both parents.
tests/test_truncate.py:56
Function
test_topological_sort_multiple_fks_on_one_model
Event has FKs to both Tournament and Reporter — must come before both.
tests/test_truncate.py:64
Function
test_topological_sort_no_fk_models
Models without FK relationships are still included.
tests/test_truncate.py:41
Function
test_topological_sort_self_referential_fk
Self-referential FK (Employee→Employee) must not cause infinite loop.
tests/test_truncate.py:34
Function
test_tortoise_orm_config_empty
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/cli/test_utils.py:32
Function
test_tortoise_orm_config_env
(monkeypatch: pytest.MonkeyPatch)
tests/cli/test_utils.py:13
Function
test_tortoise_orm_config_pyproject
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/cli/test_utils.py:18
Method
test_tortoise_test_context_creates_isolated_context
tortoise_test_context creates isolated context.
tests/test_context.py:293
Method
test_tortoise_test_context_multiple_isolated
Multiple tortoise_test_context calls are isolated.
tests/test_context.py:309
Method
test_tortoise_test_context_with_timezone
tortoise_test_context supports timezone parameters.
tests/test_context.py:508
Function
test_tournament
(db, pydantic_setup)
tests/contrib/test_pydantic.py:1192
Function
test_tournament_schema
(db, pydantic_setup)
tests/contrib/test_pydantic.py:680
Function
test_transaction_decorator
Test @atomic decorator with successful transaction.
tests/test_transactions.py:205
Function
test_transaction_decorator_defined_before_init
Test @atomic decorator defined before Tortoise init.
tests/test_transactions.py:224
Function
test_transaction_decorator_fail
Test @atomic decorator with failing transaction.
tests/test_transactions.py:233
Function
test_transaction_exception_1
Test double rollback raises TransactionManagementError.
tests/test_transactions.py:267
Function
test_transaction_exception_2
Test double commit raises TransactionManagementError.
tests/test_transactions.py:277
Function
test_transaction_with_m2m_relations
Test transaction with M2M relations.
tests/test_transactions.py:256
Function
test_transactions
Test basic transaction rollback on exception.
tests/test_transactions.py:27
Function
test_truncate_clears_data
Data created before truncation is gone after truncation.
tests/test_truncate.py:83
Function
test_truncate_empty_db
Truncating when tables are empty should succeed without error.
tests/test_truncate.py:77
Function
test_truncate_raises_when_apps_not_loaded
truncate_all_models raises ValueError when apps aren't loaded.
tests/test_truncate.py:120
Function
test_truncate_with_fk_constraints
Truncation succeeds even with FK constraints (child→parent).
tests/test_truncate.py:95
Function
test_truncate_with_self_referential_fk
Self-referential FK (Employee→Employee) doesn't break truncation.
tests/test_truncate.py:109
Function
test_tsvector_generated_sql
Test TSVector field generates correct SQL.
tests/contrib/postgres/test_tsvector_field.py:16
Function
test_two_databases
(two_databases)
tests/test_two_databases.py:61
Function
test_two_databases_relation
(two_databases)
tests/test_two_databases.py:75
Function
test_two_databases_transaction_paramerror
(two_databases)
tests/test_two_databases.py:124
Function
test_two_databases_transactions_switch_db
(two_databases)
tests/test_two_databases.py:108
Function
test_unfetched_bool
(db, uuid_models)
tests/fields/test_fk_uuid.py:205
Function
test_unfetched_contains
(db, uuid_models)
tests/fields/test_fk_uuid.py:171
Function
test_unfetched_getitem
(db, uuid_models)
tests/fields/test_fk_uuid.py:216
Function
test_unfetched_iter
(db, uuid_models)
tests/fields/test_fk_uuid.py:182
Function
test_unfetched_len
(db, uuid_models)
tests/fields/test_fk_uuid.py:194
Function
test_uninstantiated_await
(db, uuid_models)
tests/fields/test_fk_uuid.py:163
Function
test_uninstantiated_create
(db, uuid_models)
tests/fields/test_fk_uuid.py:146
Function
test_uninstantiated_iterate
(db, uuid_models)
tests/fields/test_fk_uuid.py:154
Function
test_unique_fail
Test that JSONField cannot be unique.
tests/fields/test_json.py:329
Function
test_unique_fail
()
tests/fields/test_binary.py:42
Function
test_unique_fail
()
tests/fields/test_text.py:39
Function
test_unique_together
(db)
tests/test_unique_together.py:12
Function
test_unique_together_with_foreign_keys
(db)
tests/test_unique_together.py:23
Function
test_unknown_connection
()
tests/model_setup/test_init.py:255
Function
test_unknown_field_in_when_annotation
(db, intfields_data)
tests/test_case_when.py:261
Function
test_unknown_scheme
()
tests/backends/test_db_url.py:15
Function
test_unsafe_generation
Assert that the IF NOT EXISTS clause is not included when generating schema.
tests/schema/test_generate_schema.py:220
Function
test_update
(db)
tests/test_update.py:34
Function
test_update
(sql_context)
tests/test_sql.py:184
Function
test_update
(db)
tests/test_validators.py:113
Function
test_update
(db)
tests/contrib/mysql/fields.py:37
Function
test_update
(db)
tests/fields/test_char.py:36
Function
test_update
(db)
tests/fields/test_bool.py:25
Function
test_update
Test JSON field update.
tests/fields/test_json.py:76
Function
test_update
Test array field update.
tests/fields/test_array.py:31
Function
test_update
(db)
tests/fields/test_decimal.py:54
Function
test_update
(db)
tests/fields/test_uuid.py:37
Function
test_update
(db)
tests/fields/test_float.py:29
Function
test_update_auto_now
(db)
tests/test_update.py:158
Function
test_update_await_across_transaction_fail
Test update await across transaction that fails.
tests/test_transactions.py:317
Function
test_update_await_across_transaction_success
Test update await across transaction that succeeds.
tests/test_transactions.py:334
Function
test_update_badparam
(db)
tests/test_queryset.py:509
Function
test_update_basic
(db)
tests/test_queryset.py:492
Function
test_update_by_id
(db)
tests/fields/test_fk_with_unique.py:81
Function
test_update_by_id
(db)
tests/fields/test_fk.py:110
Function
test_update_by_id
(db)
tests/fields/test_o2o_with_unique.py:81
Function
test_update_by_id
(db, uuid_models)
tests/fields/test_fk_uuid.py:131
Function
test_update_by_name
(db)
tests/fields/test_fk_with_unique.py:66
Function
test_update_by_name
(db)
tests/fields/test_fk.py:95
Function
test_update_by_name
(db)
tests/fields/test_o2o_with_unique.py:66
Function
test_update_by_name
(db, uuid_models)
tests/fields/test_fk_uuid.py:115
Function
test_update_f_expression
(db)
tests/test_queryset.py:501
Function
test_update_few_fields_with_save
(benchmark, few_fields_benchmark_dataset)
tests/benchmarks/test_update.py:7
Function
test_update_few_fields_with_update
(benchmark, few_fields_benchmark_dataset)
tests/benchmarks/test_update.py:42
Function
test_update_from_dict
(db)
tests/test_model_methods.py:376
Function
test_update_many_fields_with_save
( benchmark, many_fields_benchmark_dataset, gen_many_fields_data )
tests/benchmarks/test_update.py:21
Function
test_update_many_fields_with_update
( benchmark, many_fields_benchmark_dataset, gen_many_fields_data )
tests/benchmarks/test_update.py:57
Function
test_update_or_create
(tournament_model)
tests/test_model_methods.py:239
Function
test_update_or_create_with_defaults
(tournament_model)
tests/test_model_methods.py:252
Function
test_update_pk
(db)
tests/test_queryset.py:516
Function
test_update_relation
(db)
tests/test_update.py:169
Function
test_update_schema
All fields of this schema should be optional. This demonstrates an example PATCH endpoint in an API, where a client may want to update a singl
tests/contrib/test_pydantic.py:1900
Method
test_update_skips_database_default_fields
(self, db)
tests/test_db_default_insert.py:195
Function
test_update_user
(client: TestClient)
examples/blacksheep/_tests.py:58
Function
test_update_virtual
(db)
tests/test_queryset.py:523
Function
test_update_with_case_when_and_f
(db)
tests/test_update.py:239
Function
test_update_with_custom_function
(db)
tests/test_update.py:181
Function
test_update_with_filter_subquery
(db)
tests/test_update.py:282
Function
test_update_with_function_annotation
(db)
tests/test_update.py:269
Function
test_update_with_int_enum_value
Test updating with integer enum value.
tests/fields/test_subclass.py:89
Function
test_update_with_limit_ordering
(db)
tests/test_update.py:228
Function
test_upgrade_alias
(monkeypatch: pytest.MonkeyPatch, tmp_path: Path)
tests/cli/test_cli.py:205
Function
test_url_without_modules
()
tests/model_setup/test_init.py:316
Function
test_use_index
(db, intfields_data)
tests/test_queryset.py:668
Function
test_use_index_available_in_more_query
(db, intfields_data)
tests/test_queryset.py:678
Method
test_user_list
(self, client: AsyncClient)
examples/fastapi/_tests.py:111
Method
test_user_list
(self, client_east: AsyncClient)
examples/fastapi/_tests.py:150
Function
test_uuid_field_nullability
()
tests/fields/type_checks.py:160
Method
test_uuid_m2m
(self, db)
tests/test_primary_key.py:70
← previous
next →
3,601–3,700 of 3,850, ranked by callers