github tortoise/tortoise-orm 0.12.1
v0.12.1

latest releases: 0.20.0, 0.19.3, 0.19.2...
4 years ago

Bulk insert operation

The bulk insert operation will do the minimum to ensure that the object created in the DB has all the defaults and generated fields set, but may be incomplete reference in Python.

e.g. IntField primary keys will not be poplulated.

This is recommend only for throw away inserts where you want to ensure optimal insert performance.

User.bulk_create([
    User(name="...", email="..."),
    User(name="...", email="...")
])

Also: Notable efficiency improvement for regular inserts

Don't miss a new tortoise-orm release

NewReleases is sending notifications on new releases.