chooseParameterFormatCode determines the correct format code for an argument to a prepared statement. It defaults to TextFormatCode if no determination can be made.
(m *pgtype.Map, oid uint32, arg any)
| 137 | // argument to a prepared statement. It defaults to TextFormatCode if no |
| 138 | // determination can be made. |
| 139 | func (eqb *ExtendedQueryBuilder) chooseParameterFormatCode(m *pgtype.Map, oid uint32, arg any) int16 { |
| 140 | switch arg.(type) { |
| 141 | case string, *string: |
| 142 | return TextFormatCode |
| 143 | } |
| 144 | |
| 145 | return m.FormatCodeForOID(oid) |
| 146 | } |
no test coverage detected