MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / PrepareContext

Method PrepareContext

client/conn.go:264–273  ·  view source on GitHub ↗

PrepareContext implements the driver.ConnPrepareContext.ConnPrepareContext method.

(ctx context.Context, query string)

Source from the content-addressed store, hash-verified

262
263// PrepareContext implements the driver.ConnPrepareContext.ConnPrepareContext method.
264func (c *conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
265 if atomic.LoadInt32(&c.closed) != 0 {
266 return nil, driver.ErrBadConn
267 }
268
269 log.WithField("query", query).Debug("prepared statement")
270
271 // prepare the statement
272 return newStmt(c, query), nil
273}
274
275// ExecContext implements the driver.ExecerContext.ExecContext method.
276func (c *conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (result driver.Result, err error) {

Callers 1

PrepareMethod · 0.95

Calls 3

WithFieldFunction · 0.92
newStmtFunction · 0.85
DebugMethod · 0.80

Tested by

no test coverage detected