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

Method execSimpleProtocol

conn.go:580–594  ·  view source on GitHub ↗
(ctx context.Context, sql string, arguments []any)

Source from the content-addressed store, hash-verified

578}
579
580func (c *Conn) execSimpleProtocol(ctx context.Context, sql string, arguments []any) (commandTag pgconn.CommandTag, err error) {
581 if len(arguments) > 0 {
582 sql, err = c.sanitizeForSimpleQuery(sql, arguments...)
583 if err != nil {
584 return pgconn.CommandTag{}, err
585 }
586 }
587
588 mrr := c.pgConn.Exec(ctx, sql)
589 for mrr.NextResult() {
590 commandTag, _ = mrr.ResultReader().Close()
591 }
592 err = mrr.Close()
593 return commandTag, err
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)

Callers 1

execMethod · 0.95

Calls 5

NextResultMethod · 0.80
ResultReaderMethod · 0.80
ExecMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected