2
0

Rename Json(b) to JSON(B)

This commit is contained in:
Jack Christensen
2016-08-02 13:35:52 -05:00
parent 214443deb7
commit 04c02cf3d3
5 changed files with 29 additions and 27 deletions
+3 -3
View File
@@ -298,7 +298,7 @@ func (rows *Rows) Scan(dest ...interface{}) (err error) {
if err != nil {
rows.Fatal(scanArgError{col: i, err: err})
}
} else if vr.Type().DataType == JsonOID || vr.Type().DataType == JsonbOID {
} else if vr.Type().DataType == JSONOID || vr.Type().DataType == JSONBOID {
// Because the argument passed to decodeJSON will escape the heap.
// This allows d to be stack allocated and only copied to the heap when
// we actually are decoding JSON. This saves one memory allocation per
@@ -387,11 +387,11 @@ func (rows *Rows) Values() ([]interface{}, error) {
values = append(values, decodeTimestamp(vr))
case InetOID, CidrOID:
values = append(values, decodeInet(vr))
case JsonOID:
case JSONOID:
var d interface{}
decodeJSON(vr, &d)
values = append(values, d)
case JsonbOID:
case JSONBOID:
var d interface{}
decodeJSON(vr, &d)
values = append(values, d)