ExecPrepared appends an ExecPrepared e command to the batch. See PgConn.ExecPrepared for parameter descriptions.
(stmtName string, paramValues [][]byte, paramFormats, resultFormats []int16)
| 1944 | |
| 1945 | // ExecPrepared appends an ExecPrepared e command to the batch. See PgConn.ExecPrepared for parameter descriptions. |
| 1946 | func (batch *Batch) ExecPrepared(stmtName string, paramValues [][]byte, paramFormats, resultFormats []int16) { |
| 1947 | if batch.err != nil { |
| 1948 | return |
| 1949 | } |
| 1950 | |
| 1951 | batch.buf, batch.err = (&pgproto3.Bind{PreparedStatement: stmtName, ParameterFormatCodes: paramFormats, Parameters: paramValues, ResultFormatCodes: resultFormats}).Encode(batch.buf) |
| 1952 | if batch.err != nil { |
| 1953 | return |
| 1954 | } |
| 1955 | |
| 1956 | batch.buf, batch.err = (&pgproto3.Describe{ObjectType: 'P'}).Encode(batch.buf) |
| 1957 | if batch.err != nil { |
| 1958 | return |
| 1959 | } |
| 1960 | |
| 1961 | batch.buf, batch.err = (&pgproto3.Execute{}).Encode(batch.buf) |
| 1962 | if batch.err != nil { |
| 1963 | return |
| 1964 | } |
| 1965 | } |
| 1966 | |
| 1967 | // ExecStatement appends an ExecStatement command to the batch. See PgConn.ExecPrepared for parameter descriptions. |
| 1968 | // |