MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_expanding_parameter

Method test_expanding_parameter

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

Source from the content-addressed store, hash-verified

4718 )
4719
4720 def test_expanding_parameter(self):
4721 self.assert_compile(
4722 tuple_(table1.c.myid, table1.c.name).in_(
4723 bindparam("foo", expanding=True)
4724 ),
4725 "(mytable.myid, mytable.name) IN (__[POSTCOMPILE_foo])",
4726 )
4727
4728 dialect = default.DefaultDialect()
4729 dialect.tuple_in_values = True
4730 self.assert_compile(
4731 tuple_(table1.c.myid, table1.c.name).in_(
4732 bindparam("foo", expanding=True)
4733 ),
4734 "(mytable.myid, mytable.name) IN (__[POSTCOMPILE_foo])",
4735 dialect=dialect,
4736 )
4737
4738 self.assert_compile(
4739 table1.c.myid.in_(bindparam("foo", expanding=True)),
4740 "mytable.myid IN (__[POSTCOMPILE_foo])",
4741 )
4742
4743 def test_limit_offset_select_literal_binds(self):
4744 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