MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestSetLimit_NegativeLarge

Function TestSetLimit_NegativeLarge

pkg/transform/limit_test.go:89–95  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func TestSetLimit_NegativeLarge(t *testing.T) {
90 stmt := mustParse(t, "SELECT * FROM users")
91 err := Apply(stmt, SetLimit(-100))
92 if err == nil {
93 t.Fatal("expected error for negative limit")
94 }
95}
96
97func TestSetLimit_Zero(t *testing.T) {
98 // LIMIT 0 is valid SQL - returns an empty result set.

Callers

nothing calls this directly

Calls 3

mustParseFunction · 0.85
ApplyFunction · 0.85
SetLimitFunction · 0.85

Tested by

no test coverage detected