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

Method test_limit

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

Source from the content-addressed store, hash-verified

834 )
835
836 def test_limit(self):
837 t = sql.table("t", sql.column("col1"), sql.column("col2"))
838
839 self.assert_compile(
840 select(t).limit(10).offset(20),
841 "SELECT t.col1, t.col2 FROM t LIMIT %s, %s",
842 {"param_1": 20, "param_2": 10},
843 )
844 self.assert_compile(
845 select(t).limit(10),
846 "SELECT t.col1, t.col2 FROM t LIMIT %s",
847 {"param_1": 10},
848 )
849
850 self.assert_compile(
851 select(t).offset(10),
852 "SELECT t.col1, t.col2 FROM t LIMIT %s, 18446744073709551615",
853 {"param_1": 10},
854 )
855
856 @testing.combinations(
857 (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