2
0

Adding hstore support. map[string]string will encode to hstores and throw errors on hstores with NULL values, and there is now a NullHstore type that is basically map[string]NullString and will both accept and decode NULL values properly

This commit is contained in:
Andy Walker
2014-09-17 16:17:23 -04:00
committed by Jack Christensen
parent 0441bcd8e4
commit 821605a8dd
4 changed files with 350 additions and 1 deletions
+2 -1
View File
@@ -254,7 +254,8 @@ func (rows *Rows) Scan(dest ...interface{}) (err error) {
default:
rows.Fatal(fmt.Errorf("Can't convert OID %v to time.Time", vr.Type().DataType))
}
case *map[string]string:
*d = decodeHstore(vr)
case Scanner:
err = d.Scan(vr)
if err != nil {