MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_literal_binds

Method test_literal_binds

test/sql/test_text.py:360–369  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

358 )
359
360 def test_literal_binds(self):
361 t = text("select * from foo where lala=:bar and hoho=:whee")
362 t = t.bindparams(bindparam("bar", 4), whee="whee")
363
364 self.assert_compile(
365 t,
366 "select * from foo where lala=4 and hoho='whee'",
367 checkparams={},
368 literal_binds=True,
369 )
370
371 def _assert_type_map(self, t, compare):
372 map_ = {b.key: b.type for b in t._bindparams.values()}

Callers

nothing calls this directly

Calls 4

textFunction · 0.90
bindparamFunction · 0.90
assert_compileMethod · 0.80
bindparamsMethod · 0.45

Tested by

no test coverage detected