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

Function TestSetOffset

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

Source from the content-addressed store, hash-verified

30}
31
32func TestSetOffset(t *testing.T) {
33 stmt := mustParse(t, "SELECT * FROM users")
34 err := Apply(stmt, SetOffset(20))
35 if err != nil {
36 t.Fatal(err)
37 }
38 out := format(stmt)
39 assertContains(t, out, "OFFSET")
40 assertContains(t, out, "20")
41}
42
43func TestRemoveLimit(t *testing.T) {
44 stmt := mustParse(t, "SELECT * FROM users LIMIT 10")

Callers

nothing calls this directly

Calls 5

mustParseFunction · 0.85
ApplyFunction · 0.85
SetOffsetFunction · 0.85
assertContainsFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected