MCPcopy
hub / github.com/tortoise/tortoise-orm / create

Function create

tests/test_concurrency.py:83–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81 """Test concurrent transactions with single operation."""
82
83 async def create():
84 async with in_transaction():
85 await Tournament.create(name="Test")
86
87 await asyncio.gather(*[create() for _ in range(100)])
88 count = await Tournament.all().count()

Calls 2

in_transactionFunction · 0.90
createMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…