MCPcopy
hub / github.com/geldata/gel / test_sql_dml_insert_04

Method test_sql_dml_insert_04

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

Source from the content-addressed store, hash-verified

152 )
153
154 async def test_sql_dml_insert_04(self):
155 # using arbitrary query instead of VALUES
156 await self.scon.execute(
157 '''
158 INSERT INTO "Document" (title)
159 SELECT c FROM (
160 SELECT 'Report', 1 UNION ALL SELECT 'Briefing', 2
161 ) t(c, x)
162 WHERE x >= 2
163 '''
164 )
165 res = await self.squery_values('SELECT title FROM "Document"')
166 self.assert_data_shape(res, tb.bag([['Briefing (new)']]))
167
168 async def test_sql_dml_insert_05(self):
169 # insert link

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