MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_array_expression

Method test_array_expression

test/sql/test_operators.py:5168–5185  ·  view source on GitHub ↗
(self, t_fixture, any_all_operators)

Source from the content-addressed store, hash-verified

5166 )
5167
5168 def test_array_expression(self, t_fixture, any_all_operators):
5169 t = t_fixture
5170 op, fn = any_all_operators
5171
5172 self.assert_compile(
5173 5 == fn(t.c.arrval[5:6] + postgresql.array([3, 4])),
5174 f"%(param_1)s::INTEGER = {op}"
5175 " (tab1.arrval[%(arrval_1)s::INTEGER:%(arrval_2)s::INTEGER] ||"
5176 " ARRAY[%(param_2)s::INTEGER, %(param_3)s::INTEGER])",
5177 checkparams={
5178 "arrval_2": 6,
5179 "param_1": 5,
5180 "param_3": 4,
5181 "arrval_1": 5,
5182 "param_2": 3,
5183 },
5184 dialect="postgresql",
5185 )
5186
5187 def test_subq(self, t_fixture, any_all_operators):
5188 t = t_fixture

Callers

nothing calls this directly

Calls 2

assert_compileMethod · 0.80
arrayMethod · 0.80

Tested by

no test coverage detected