Fix parsing text array with negative bounds
e.g. '[-4:-2]={1,2,3}'
fixes #132
This commit is contained in:
@@ -100,6 +100,14 @@ func TestParseUntypedTextArray(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
source: "[-4:-2]={1,2,3}",
|
||||
result: pgtype.UntypedTextArray{
|
||||
Elements: []string{"1", "2", "3"},
|
||||
Quoted: []bool{false, false, false},
|
||||
Dimensions: []pgtype.ArrayDimension{{Length: 3, LowerBound: -4}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for i, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user