MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_expanding_parameter

Method test_expanding_parameter

test/sql/test_compiler.py:4925–4946  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4923 )
4924
4925 def test_expanding_parameter(self):
4926 self.assert_compile(
4927 tuple_(table1.c.myid, table1.c.name).in_(
4928 bindparam("foo", expanding=True)
4929 ),
4930 "(mytable.myid, mytable.name) IN (__[POSTCOMPILE_foo])",
4931 )
4932
4933 dialect = default.DefaultDialect()
4934 dialect.tuple_in_values = True
4935 self.assert_compile(
4936 tuple_(table1.c.myid, table1.c.name).in_(
4937 bindparam("foo", expanding=True)
4938 ),
4939 "(mytable.myid, mytable.name) IN (__[POSTCOMPILE_foo])",
4940 dialect=dialect,
4941 )
4942
4943 self.assert_compile(
4944 table1.c.myid.in_(bindparam("foo", expanding=True)),
4945 "mytable.myid IN (__[POSTCOMPILE_foo])",
4946 )
4947
4948 def test_limit_offset_select_literal_binds(self):
4949 stmt = select(1).limit(5).offset(6)

Callers

nothing calls this directly

Calls 4

tuple_Function · 0.90
bindparamFunction · 0.90
assert_compileMethod · 0.80
in_Method · 0.45

Tested by

no test coverage detected