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

Method execute_insert

tortoise/backends/mssql/client.py:64–69  ·  view source on GitHub ↗
(self, query: str, values: list)

Source from the content-addressed store, hash-verified

62
63 @translate_exceptions
64 async def execute_insert(self, query: str, values: list) -> int:
65 async with self.acquire_connection() as connection:
66 self.log.debug("%s: %s", query, values)
67 async with connection.cursor() as cursor:
68 await cursor.execute(f"SET NOCOUNT ON; {query}; SELECT @@IDENTITY", values)
69 return (await cursor.fetchone())[0]
70
71 async def db_delete(self) -> None:
72 if not self.database:

Callers 2

_execute_manyMethod · 0.45
saveMethod · 0.45

Calls 1

acquire_connectionMethod · 0.45

Tested by

no test coverage detected