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

Method queryRowScan

server/attach_timeout.go:115–119  ·  view source on GitHub ↗

queryRowScan runs a single-row query with the default attachStepTimeout and scans the result into dest. On timeout dest is NOT written; callers must treat a non-nil error as "value unknown" (all current callers do).

(query string, dest ...any)

Source from the content-addressed store, hash-verified

113// scans the result into dest. On timeout dest is NOT written; callers must
114// treat a non-nil error as "value unknown" (all current callers do).
115func (a *attachStepExecer) queryRowScan(query string, dest ...any) error {
116 return a.run(attachStepTimeout, query, func(ctx context.Context) error {
117 return a.db.QueryRowContext(ctx, query).Scan(dest...)
118 })
119}
120
121// run executes fn (one DuckDB statement) under a timeout. See the
122// attachStepExecer doc comment for the two-layer deadline semantics.

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
ScanMethod · 0.65

Tested by

no test coverage detected