2
0

Query supports QueryExecMode

Fixed QueryExecModeExec as it must only use text format without
specifying param OIDs.
This commit is contained in:
Jack Christensen
2022-03-12 14:15:39 -06:00
parent 0c166c7620
commit 1390a11fe2
4 changed files with 162 additions and 96 deletions
+6 -2
View File
@@ -14,9 +14,13 @@ type extendedQueryBuilder struct {
func (eqb *extendedQueryBuilder) AppendParam(m *pgtype.Map, oid uint32, arg interface{}) error {
f := eqb.chooseParameterFormatCode(m, oid, arg)
eqb.paramFormats = append(eqb.paramFormats, f)
return eqb.AppendParamFormat(m, oid, f, arg)
}
v, err := eqb.encodeExtendedParamValue(m, oid, f, arg)
func (eqb *extendedQueryBuilder) AppendParamFormat(m *pgtype.Map, oid uint32, format int16, arg interface{}) error {
eqb.paramFormats = append(eqb.paramFormats, format)
v, err := eqb.encodeExtendedParamValue(m, oid, format, arg)
if err != nil {
return err
}