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

Method SendQueryPrepared

pgconn/pgconn.go:2497–2506  ·  view source on GitHub ↗

SendQueryPrepared is the pipeline version of *PgConn.ExecPrepared.

(stmtName string, paramValues [][]byte, paramFormats, resultFormats []int16)

Source from the content-addressed store, hash-verified

2495
2496// SendQueryPrepared is the pipeline version of *PgConn.ExecPrepared.
2497func (p *Pipeline) SendQueryPrepared(stmtName string, paramValues [][]byte, paramFormats, resultFormats []int16) {
2498 if p.closed {
2499 return
2500 }
2501
2502 p.conn.frontend.SendBind(&pgproto3.Bind{PreparedStatement: stmtName, ParameterFormatCodes: paramFormats, Parameters: paramValues, ResultFormatCodes: resultFormats})
2503 p.conn.frontend.SendDescribe(&pgproto3.Describe{ObjectType: 'P'})
2504 p.conn.frontend.SendExecute(&pgproto3.Execute{})
2505 p.state.PushBackRequestType(pipelineQueryPrepared)
2506}
2507
2508// SendQueryStatement is the pipeline version of *PgConn.ExecStatement.
2509func (p *Pipeline) SendQueryStatement(statementDescription *StatementDescription, paramValues [][]byte, paramFormats, resultFormats []int16) {

Calls 4

SendBindMethod · 0.80
SendDescribeMethod · 0.80
SendExecuteMethod · 0.80
PushBackRequestTypeMethod · 0.80