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

Method ExecParams

pgconn/pgconn.go:1933–1943  ·  view source on GitHub ↗

ExecParams appends an ExecParams command to the batch. See PgConn.ExecParams for parameter descriptions.

(sql string, paramValues [][]byte, paramOIDs []uint32, paramFormats, resultFormats []int16)

Source from the content-addressed store, hash-verified

1931
1932// ExecParams appends an ExecParams command to the batch. See PgConn.ExecParams for parameter descriptions.
1933func (batch *Batch) ExecParams(sql string, paramValues [][]byte, paramOIDs []uint32, paramFormats, resultFormats []int16) {
1934 if batch.err != nil {
1935 return
1936 }
1937
1938 batch.buf, batch.err = (&pgproto3.Parse{Query: sql, ParameterOIDs: paramOIDs}).Encode(batch.buf)
1939 if batch.err != nil {
1940 return
1941 }
1942 batch.ExecPrepared("", paramValues, paramFormats, resultFormats)
1943}
1944
1945// ExecPrepared appends an ExecPrepared e command to the batch. See PgConn.ExecPrepared for parameter descriptions.
1946func (batch *Batch) ExecPrepared(stmtName string, paramValues [][]byte, paramFormats, resultFormats []int16) {

Callers 15

TestConnExecBatchFunction · 0.95
TestConnExecBatchHugeFunction · 0.95
stressBatchFunction · 0.95
execParamsMethod · 0.45
execSQLParamsMethod · 0.45
QueryMethod · 0.45

Calls 2

ExecPreparedMethod · 0.95
EncodeMethod · 0.65

Tested by 15

TestConnExecBatchFunction · 0.76
TestConnExecBatchHugeFunction · 0.76
stressBatchFunction · 0.76
TestScanRowFunction · 0.36
TestTraceFunction · 0.36
TestConnectTLSFunction · 0.36
TestConnectOAuthFunction · 0.36