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

Method execParams

conn.go:596–605  ·  view source on GitHub ↗
(ctx context.Context, sd *pgconn.StatementDescription, arguments []any)

Source from the content-addressed store, hash-verified

594}
595
596func (c *Conn) execParams(ctx context.Context, sd *pgconn.StatementDescription, arguments []any) (pgconn.CommandTag, error) {
597 err := c.eqb.Build(c.typeMap, sd, arguments)
598 if err != nil {
599 return pgconn.CommandTag{}, err
600 }
601
602 result := c.pgConn.ExecParams(ctx, sd.SQL, c.eqb.ParamValues, sd.ParamOIDs, c.eqb.ParamFormats, c.eqb.ResultFormats).Read()
603 c.eqb.reset() // Allow c.eqb internal memory to be GC'ed as soon as possible.
604 return result.CommandTag, result.Err
605}
606
607func (c *Conn) execPrepared(ctx context.Context, sd *pgconn.StatementDescription, arguments []any) (pgconn.CommandTag, error) {
608 err := c.eqb.Build(c.typeMap, sd, arguments)

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