MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_limit

Method test_limit

test/dialect/mysql/test_compiler.py:996–1014  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

994 )
995
996 def test_limit(self):
997 t = sql.table("t", sql.column("col1"), sql.column("col2"))
998
999 self.assert_compile(
1000 select(t).limit(10).offset(20),
1001 "SELECT t.col1, t.col2 FROM t LIMIT %s, %s",
1002 {"param_1": 20, "param_2": 10},
1003 )
1004 self.assert_compile(
1005 select(t).limit(10),
1006 "SELECT t.col1, t.col2 FROM t LIMIT %s",
1007 {"param_1": 10},
1008 )
1009
1010 self.assert_compile(
1011 select(t).offset(10),
1012 "SELECT t.col1, t.col2 FROM t LIMIT %s, 18446744073709551615",
1013 {"param_1": 10},
1014 )
1015
1016 @testing.combinations(
1017 (String,),

Callers

nothing calls this directly

Calls 6

selectFunction · 0.90
assert_compileMethod · 0.80
tableMethod · 0.45
columnMethod · 0.45
offsetMethod · 0.45
limitMethod · 0.45

Tested by

no test coverage detected