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

Method test_sql_native_query_05

tests/test_sql_query.py:3129–3141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3127 await self.assert_sql_query_result('SELECT 1 AS a, 2 AS a', [])
3128
3129 async def test_sql_native_query_05(self):
3130 # `a` would be duplicated,
3131 # so second and third instance are prefixed with rel var name
3132 await self.assert_sql_query_result(
3133 '''
3134 WITH
3135 x(a) AS (VALUES (1::int)),
3136 y(a) AS (VALUES (1::int + 1::int)),
3137 z(a) AS (VALUES (1::int + 1::int + 1::int))
3138 SELECT * FROM x, y JOIN z u ON TRUE::bool
3139 ''',
3140 [{'a': 1, 'y_a': 2, 'u_a': 3}],
3141 )
3142
3143 async def test_sql_native_query_06(self):
3144 await self.assert_sql_query_result(

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected