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

Function TestSetLimit

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

Source from the content-addressed store, hash-verified

19)
20
21func TestSetLimit(t *testing.T) {
22 stmt := mustParse(t, "SELECT * FROM users")
23 err := Apply(stmt, SetLimit(10))
24 if err != nil {
25 t.Fatal(err)
26 }
27 out := format(stmt)
28 assertContains(t, out, "LIMIT")
29 assertContains(t, out, "10")
30}
31
32func TestSetOffset(t *testing.T) {
33 stmt := mustParse(t, "SELECT * FROM users")

Callers

nothing calls this directly

Calls 5

mustParseFunction · 0.85
ApplyFunction · 0.85
SetLimitFunction · 0.85
assertContainsFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected