MCPcopy Index your code
hub / github.com/geldata/gel / test_sql_dml_insert_12

Method test_sql_dml_insert_12

tests/test_sql_dml.py:288–300  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

286 )
287
288 async def test_sql_dml_insert_12(self):
289 # returning
290 await self.scon.execute('INSERT INTO "User" DEFAULT VALUES;')
291 res = await self.scon.fetch(
292 '''
293 INSERT INTO "Document" (title, owner_id)
294 SELECT 'Meeting Report', id FROM "User" LIMIT 1
295 RETURNING id, owner_id, LOWER(title) as my_title
296 '''
297 )
298 self.assert_shape(res, rows=1, columns=["id", "owner_id", "my_title"])
299 first = res[0]
300 self.assertEqual(first[2], 'meeting report (new)')
301
302 async def test_sql_dml_insert_13(self):
303 # returning sublink

Callers

nothing calls this directly

Calls 2

executeMethod · 0.80
assert_shapeMethod · 0.45

Tested by

no test coverage detected