MCPcopy
hub / github.com/jackc/pgx / execSQLParams

Method execSQLParams

conn.go:618–627  ·  view source on GitHub ↗
(ctx context.Context, sql string, args []any)

Source from the content-addressed store, hash-verified

616}
617
618func (c *Conn) execSQLParams(ctx context.Context, sql string, args []any) (pgconn.CommandTag, error) {
619 err := c.eqb.Build(c.typeMap, nil, args)
620 if err != nil {
621 return pgconn.CommandTag{}, err
622 }
623
624 result := c.pgConn.ExecParams(ctx, sql, c.eqb.ParamValues, nil, c.eqb.ParamFormats, c.eqb.ResultFormats).Read()
625 c.eqb.reset() // Allow c.eqb internal memory to be GC'ed as soon as possible.
626 return result.CommandTag, result.Err
627}
628
629func (c *Conn) getRows(ctx context.Context, sql string, args []any) *baseRows {
630 r := &baseRows{}

Callers 1

execMethod · 0.95

Calls 4

BuildMethod · 0.80
resetMethod · 0.80
ReadMethod · 0.45
ExecParamsMethod · 0.45

Tested by

no test coverage detected