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

Struct selectOneExecutor

server/query_source_test.go:101–104  ·  view source on GitHub ↗

selectOneExecutor answers any QueryContext with a single-row RowSet, so a SELECT in a batch alongside the query_source GUC actually executes.

Source from the content-addressed store, hash-verified

99// clientConn wrote to its buffer (type byte + 4-byte length incl. length).
100func parseWireMsgs(t *testing.T, buf []byte) []wireMsg {
101 t.Helper()
102 var msgs []wireMsg
103 for i := 0; i+5 <= len(buf); {
104 typ := buf[i]
105 length := int(buf[i+1])<<24 | int(buf[i+2])<<16 | int(buf[i+3])<<8 | int(buf[i+4])
106 if length < 4 || i+1+length > len(buf) {
107 t.Fatalf("malformed wire message at offset %d (length %d, remaining %d)", i, length, len(buf)-i)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected