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

Method execPrepared

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

Source from the content-addressed store, hash-verified

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)
609 if err != nil {
610 return pgconn.CommandTag{}, err
611 }
612
613 result := c.pgConn.ExecStatement(ctx, sd, c.eqb.ParamValues, c.eqb.ParamFormats, c.eqb.ResultFormats).Read()
614 c.eqb.reset() // Allow c.eqb internal memory to be GC'ed as soon as possible.
615 return result.CommandTag, result.Err
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)

Callers 1

execMethod · 0.95

Calls 4

BuildMethod · 0.80
resetMethod · 0.80
ReadMethod · 0.45
ExecStatementMethod · 0.45

Tested by

no test coverage detected