MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / QueryContext

Method QueryContext

cmd/cql-proxy/storage/impersonate.go:117–132  ·  view source on GitHub ↗
(ctx context.Context, query string, args []driver.NamedValue)

Source from the content-addressed store, hash-verified

115}
116
117func (d *impersonatedDB) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (
118 rows driver.Rows, err error) {
119 resp, err := d.sendQuery(query, args, types.ReadQuery)
120 if err != nil {
121 err = errors.Wrapf(err, "send query failed")
122 return
123 }
124
125 rows = &impersonatedRows{
126 columns: resp.Payload.Columns,
127 types: resp.Payload.DeclTypes,
128 data: resp.Payload.Rows,
129 }
130
131 return
132}
133
134func (d *impersonatedDB) sendQuery(query string, args []driver.NamedValue, queryType types.QueryType) (
135 resp *types.Response, err error) {

Callers

nothing calls this directly

Calls 1

sendQueryMethod · 0.95

Tested by

no test coverage detected