MCPcopy Create free account

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

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

Functionquery_api_db
Fixture for QueryApi tests that initializes an in-memory SQLite database.
tests/test_query_api.py:46
Functionquery_without_app
(pk: int)
examples/fastapi/_tests.py:174
Methodquote
(val: str)
tortoise/schema_quoting.py:44
Functionrace_data
Set up race participant data for filter tests.
tests/fields/test_subclass_filters.py:8
Functionraise_if_not_dict_or_list
(value: dict | list)
tests/testmodels.py:362
Methodraw
Return the QuerySet from raw SQL
tortoise/queryset.py:818
Functionregexp
(expr, item)
tortoise/contrib/sqlite/regex.py:33
Functionregister
Reset state every time this is called, since we now get new AST to transform.
tortoise/contrib/pylint/__init__.py:21
Functionregister_tortoise
Registers Tortoise-ORM with set-up at the beginning of FastAPI application's lifespan (which allow user to read/write data from/to db inside
tortoise/contrib/fastapi/__init__.py:208
Functionrelated_list_encoder
(values: Iterable[Any], instance: Model, field: Field)
tortoise/filters.py:73
Methodrelease_savepoint
(self)
tortoise/backends/mssql/client.py:116
Methodrelease_savepoint
(self)
tortoise/backends/mysql/client.py:294
Methodrelease_savepoint
(self)
tortoise/backends/odbc/client.py:216
Methodrelease_savepoint
(self)
tortoise/backends/psycopg/client.py:242
Methodrelease_savepoint
(self)
tortoise/backends/sqlite/client.py:268
Methodrelease_savepoint
(self)
tortoise/backends/asyncpg/client.py:209
Methodremove_constraint
(self, model, constraint)
tortoise/migrations/schema_editor/mysql.py:272
Methodremove_constraint
(self, model, constraint)
tortoise/migrations/schema_editor/base_postgres.py:130
Methodremove_field
(self, model, field)
tortoise/migrations/schema_editor/sqlite.py:209
Methodremove_index
(self, model, index)
tortoise/migrations/schema_editor/mysql.py:267
Methodrename_constraint
(self, model, old_constraint, new_constraint)
tortoise/migrations/schema_editor/sqlite.py:196
Methodrequired
Returns ``True`` if the field is required to be provided. It needs to be non-nullable and not have a default or be DB-generated to b
tortoise/fields/base.py:349
Functionrequires_no_context
Skip the test if there's already an active TortoiseContext.
tests/utils/test_run_async.py:25
Functionreset_post_summary
(apps, schema_editor)
examples/migrations_project/migrations/0013_add_post_summary.py:11
Functionreset_timezone_cache
Reset timezone cache before and after each test.
tests/fields/test_time.py:38
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:62
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:74
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:93
Methodresolve
Used to resolve the Function statement for SQL generation. :param model: Model the function is applied on to. :param table:
tortoise/expressions.py:567
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:689
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:720
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:124
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:166
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:228
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:268
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:290
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:361
Methodresolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:474
Methodrouters
Get the database routers for this context. Returns: List of router classes configured for this context.
tortoise/context.py:230
Functionrows_affected_setup
Fixture to set up Tournament data for rows_affected tests.
tests/test_query_api.py:201
Methodrun
( self, app_label: str, state: State, dry_run: bool, state_editor: Bas
tortoise/migrations/operations.py:80
Methodrun
( self, app_label: str, state: State, dry_run: bool, state_editor: Bas
tortoise/migrations/operations.py:127
Methodrun_operations
( self, app_label: str, state: State, *, dry_run: bool = False,
tortoise/migrations/migration.py:25
Methodrun_sql
(self, db_connection: BaseDBAsyncClient | None = None)
tortoise/migrations/operations.py:222
Functionrunner
(*args, **kwargs)
tortoise/contrib/test/__init__.py:286
Functionrunner
()
examples/fastapi/_tests.py:175
Methodsavepoint
(self)
tortoise/backends/mssql/client.py:103
Methodsavepoint
(self)
tortoise/backends/mysql/client.py:271
Methodsavepoint
(self)
tortoise/backends/odbc/client.py:210
Methodsavepoint
(self)
tortoise/backends/psycopg/client.py:230
Methodsavepoint
(self)
tortoise/backends/sqlite/client.py:256
Methodsavepoint
(self)
tortoise/backends/asyncpg/client.py:198
Methodsavepoint_rollback
(self)
tortoise/backends/mssql/client.py:107
Methodsavepoint_rollback
(self)
tortoise/backends/mysql/client.py:282
Methodsavepoint_rollback
(self)
tortoise/backends/odbc/client.py:213
Methodsavepoint_rollback
(self)
tortoise/backends/psycopg/client.py:254
Methodsavepoint_rollback
(self)
tortoise/backends/sqlite/client.py:260
Methodsavepoint_rollback
(self)
tortoise/backends/asyncpg/client.py:220
Functionsearch
(field: Term, value: str)
tortoise/filters.py:155
Methodselect_for_update
Make QuerySet select for update. Returns a queryset that will lock rows until the end of the transaction, generating a SELEC
tortoise/queryset.py:589
Methodselect_related
(self, *args: str)
tortoise/queryset.py:67
Functionsetup
(app)
docs/sphinx_autodoc_typehints.py:423
Functionsetup_database
Cleanup fixture that depends on db to ensure context is active.
tests/benchmarks/conftest.py:21
Functionsignal_post_delete
( sender: type[Signals], instance: Signals, using_db: BaseDBAsyncClient | None )
tests/test_signals.py:39
Functionsignal_post_delete
( sender: type[Signal], instance: Signal, using_db: BaseDBAsyncClient | None )
examples/signals.py:47
Functionsignal_post_save
( sender: type[Signals], instance: Signals, created: bool, using_db: BaseDBAsyncClient | None,
tests/test_signals.py:20
Functionsignal_post_save
( sender: type[Signal], instance: Signal, created: bool, using_db: BaseDBAsyncClient | None,
examples/signals.py:29
Functionsignal_pre_delete
( sender: type[Signals], instance: Signals, using_db: BaseDBAsyncClient | None )
tests/test_signals.py:32
Functionsignal_pre_delete
( sender: type[Signal], instance: Signal, using_db: BaseDBAsyncClient | None )
examples/signals.py:40
Functionsignal_pre_save
( sender: type[Signals], instance: Signals, using_db, update_fields )
tests/test_signals.py:12
Functionsignal_pre_save
(sender: type[Signal], instance: Signal, using_db, update_fields)
examples/signals.py:24
Functionsignals_data
Set up test data for signal tests.
tests/test_signals.py:46
Functionskip_if_codspeed_not_enabled
(request)
tests/benchmarks/conftest.py:28
Functionskip_wrapper
(*args: typing.Any, **kwargs: typing.Any)
tortoise/contrib/test/__init__.py:207
Functionsnake_case_table_names
Convert CamelCase class name to snake_case table name
examples/global_table_name_generator.py:10
Functionsource_fields_instance
Create a SourceFields instance for testing.
tests/test_only.py:20
Methodsplit_reference
Validate, if reference follow the official naming conventions. Throws a ConfigurationError with a hopefully helpful message.
tortoise/apps.py:148
Methodsql
(self, params_inline=False)
tortoise/queryset.py:2004
Methodsql
(self, params_inline=False)
tortoise/queryset.py:2211
Functionsql_context
Fixture providing database connection, dialect and psycopg flag.
tests/test_sql.py:13
Functionsqlmigrate
Collect the SQL statements for a single migration without executing them. Args: config: Tortoise ORM config dict or TortoiseConfig object
tortoise/migrations/api/sqlmigrate.py:26
Functionstarts_with
(field: Term, value: str)
tortoise/filters.py:174
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:53
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:558
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:658
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:719
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:777
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:854
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:921
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:980
Methodstate_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:1101
Functionstate_with_model
(empty_state: State)
tests/migrations/conftest.py:21
Functionstate_with_two_models
(empty_state: State)
tests/migrations/conftest.py:29
Functionstraight_fields_instance
Create a StraightFields instance for testing.
tests/test_only.py:14
Functionstring_encoder
(value: Any, instance: Model, field: Field)
tortoise/filters.py:84
Functiontable_name_db
Fixture for table name generator tests with in-memory SQLite.
tests/test_table_name.py:28
Functiontable_name_generator
(model_cls: type[Model])
tests/test_table_name.py:9
Methodteam_size
Computes team size. Note that this function needs to be annotated with a return type so that pydantic can generate a valid
tests/testmodels.py:664
Methodteam_size
Computes team size. Note that this function needs to be annotated with a return type so that pydantic can generate a valid
examples/pydantic/recursive.py:30
Functiontest_0_value_fk
ForegnKeyField should exits even if the the source_field looks like false, but not None src: https://github.com/tortoise/tortoise-orm/issues/1274
tests/test_relations.py:425
← previousnext →1,901–2,000 of 3,850, ranked by callers