2
0

Merge common JSON and JSONB

This commit is contained in:
Jack Christensen
2015-09-04 11:04:51 -05:00
parent 7383e240d4
commit 9d200733b9
3 changed files with 32 additions and 42 deletions
+1 -3
View File
@@ -799,9 +799,7 @@ func (c *Conn) sendPreparedQuery(ps *PreparedStatement, arguments ...interface{}
err = encodeTimestampArray(wbuf, arguments[i], TimestampTzOid)
case OidOid:
err = encodeOid(wbuf, arguments[i])
case JsonOid:
err = encodeJson(wbuf, arguments[i])
case JsonbOid:
case JsonOid, JsonbOid:
err = encodeJson(wbuf, arguments[i])
default:
return SerializationError(fmt.Sprintf("Cannot encode %T into oid %v - %T must implement Encoder or be converted to a string", arg, oid, arg))