Familiar asyncio ORM for python, built with relations in mind
create_unique_index
argument to M2M field and default if it is true (#1620)pk=True
__eq__
method to Q
to more easily test dynamically-built queries (#1506)DatetimeField
use '__year' report 'int' object has no attribute 'utcoffset'
. (#1575)bulk_update
when using custom fields. (#1564)optional
parameter in pydantic_model_creator
does not work for pydantic v2. (#1551)get_annotations
now evaluates annotations in the default scope instead of the app namespace. (#1552)get_or_create
method. (#1404)index_name
instead of BaseSchemaGenerator._generate_index_name
to generate index name.QuerySet
to match count result to QuerySet
result. (#1607)utils.chunk
from function to return iterables lazily.pk
/index
to primary_key
/db_index
. (#1621)Model.check
method to Model._check
to avoid naming collision issues (#1559) (#1550)bulk_create
now does not return anything. (#1614)UUIDField
in MySQL
. (#1458)Model
, Tortoise
, BaseDBAsyncClient
, __version__
, and connections
are now exported from tortoise
validators
to pydantic_model_creator
. (#1471)ValuesListQuery
when it has more than 10 fields. (#1492)exclude_readonly
parameter not working.pydantic
2.0. (#1433)pydantic
1.x.python
3.7.config_class
of pydantic_model_creator
is renamed to model_config
.config_class
of PydanticMeta
is renamed to model_config
.Config
class. (#1048)schema
attribute to Model's Meta to specify exact schema to use with the model.using_db
wrong position in model shortcut methods. (#1150)Oracle
database by adding database info to DBQ in connection string.Oracle
database (#1155)ssl
option in MySQL connection string.QuerySetSingle
.Postgres
/SQLite
partial indexes support. (#1103)Microsoft SQL Server
/Oracle
support, powered by asyncodbc, note that which is not fully tested.optional
parameter to pydantic_model_creator
. (#770)using_db
parameter to Model
shortcut methods. (#1109)TimeField
for MySQL
will return datetime.timedelta
object instead of datetime.time
object._custom_generated_pk
attribute not set in Model._init_from_db
method. (#633)TimeField
. (#1054).ArrayField
for postgres
.bulk_create
doesn't work correctly with more than 1 update_fields. (#1046)bulk_update
errors when setting null for a smallint column on postgres. (#1086)Tortoise.get_connection
Tortoise.close_connections
tortoise.transactions.get_connection
method to tortoise.transactions._get_connection
.
Note that this method has now been marked private to this module and is not part of the public API