2
0

Fix ranges with text format where end is unbounded

fixes #342
This commit is contained in:
Jack Christensen
2017-11-04 14:03:46 -05:00
parent 5ab54cb24f
commit 4e334054dd
4 changed files with 29 additions and 13 deletions
+12
View File
@@ -29,6 +29,18 @@ func TestNumrangeTranscode(t *testing.T) {
UpperType: pgtype.Exclusive,
Status: pgtype.Present,
},
&pgtype.Numrange{
Lower: pgtype.Numeric{Int: big.NewInt(-42), Exp: 1, Status: pgtype.Present},
LowerType: pgtype.Inclusive,
UpperType: pgtype.Unbounded,
Status: pgtype.Present,
},
&pgtype.Numrange{
Upper: pgtype.Numeric{Int: big.NewInt(-42), Exp: 1, Status: pgtype.Present},
LowerType: pgtype.Unbounded,
UpperType: pgtype.Exclusive,
Status: pgtype.Present,
},
&pgtype.Numrange{Status: pgtype.Null},
})
}