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

Method test_sql_dml_insert_10

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

Source from the content-addressed store, hash-verified

256 self.assertEqual(res, tb.bag([['Report (new)'], ['Briefing (new)']]))
257
258 async def test_sql_dml_insert_10(self):
259 # two inserts
260 await self.scon.execute(
261 '''
262 WITH a AS (
263 INSERT INTO "Document" (title) VALUES ('Report')
264 RETURNING title as t
265 )
266 INSERT INTO "Document" (title) SELECT t || ' - copy' FROM a
267 '''
268 )
269 res = await self.squery_values('SELECT title FROM "Document"')
270 self.assert_data_shape(
271 res, tb.bag([['Report (new)'], ['Report (new) - copy (new)']])
272 )
273
274 async def test_sql_dml_insert_11(self):
275 await self.scon.execute(

Callers

nothing calls this directly

Calls 3

executeMethod · 0.80
squery_valuesMethod · 0.80
assert_data_shapeMethod · 0.80

Tested by

no test coverage detected