MCPcopy Create free account
hub / github.com/PostHog/duckgres / cursorUsers

Function cursorUsers

tests/integration/cursor_test.go:38–50  ·  view source on GitHub ↗

cursorUsers returns the users fixture rows (fixtures/data.sql) with firstID <= id <= lastID, ordered by id.

(firstID, lastID int)

Source from the content-addressed store, hash-verified

36// cursorUsers returns the users fixture rows (fixtures/data.sql) with
37// firstID <= id <= lastID, ordered by id.
38func cursorUsers(firstID, lastID int) []cursorRow {
39 all := []cursorRow{
40 {1, "Alice"}, {2, "Bob"}, {3, "Charlie"}, {4, "Diana"}, {5, "Eve"},
41 {6, "Frank"}, {7, "Grace"}, {8, "Henry"}, {9, "Ivy"}, {10, "Jack"},
42 }
43 var out []cursorRow
44 for _, u := range all {
45 if u.id >= firstID && u.id <= lastID {
46 out = append(out, u)
47 }
48 }
49 return out
50}
51
52func assertCursorRows(t *testing.T, label string, got, want []cursorRow) {
53 t.Helper()

Callers 5

cursorLifecycleFlowFunction · 0.85
cursorMoveFlowFunction · 0.85
cursorBackwardFlowFunction · 0.85
TestCursorSimpleQueryFunction · 0.85
TestCursorExtendedQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected