MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_text_literal_binds

Method test_text_literal_binds

test/sql/test_defaults.py:80–91  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

78 )
79
80 def test_text_literal_binds(self):
81 m = MetaData()
82 t = Table(
83 "t",
84 m,
85 Column(
86 "x", Integer, server_default=text("q + :x1").bindparams(x1=7)
87 ),
88 )
89 self.assert_compile(
90 CreateTable(t), "CREATE TABLE t (x INTEGER DEFAULT q + 7)"
91 )
92
93 def test_sqlexpr(self):
94 m = MetaData()

Callers

nothing calls this directly

Calls 7

MetaDataClass · 0.90
TableClass · 0.90
ColumnClass · 0.90
textFunction · 0.90
CreateTableClass · 0.85
assert_compileMethod · 0.80
bindparamsMethod · 0.45

Tested by

no test coverage detected