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

Method execute_insert

tortoise/backends/mysql/client.py:188–193  ·  view source on GitHub ↗
(self, query: str, values: list)

Source from the content-addressed store, hash-verified

186
187 @translate_exceptions
188 async def execute_insert(self, query: str, values: list) -> int:
189 async with self.acquire_connection() as connection:
190 self.log.debug("%s: %s", query, values)
191 async with connection.cursor() as cursor:
192 await cursor.execute(query, values)
193 return cursor.lastrowid # return auto-generated id
194
195 @translate_exceptions
196 async def execute_many(self, query: str, values: list) -> None:

Callers

nothing calls this directly

Calls 1

acquire_connectionMethod · 0.95

Tested by

no test coverage detected