Add remaining int array conversions
This commit is contained in:
@@ -73,6 +73,13 @@ func TestInt4ArraySet(t *testing.T) {
|
||||
Dimensions: []pgtype.ArrayDimension{{LowerBound: 1, Length: 1}},
|
||||
Status: pgtype.Present},
|
||||
},
|
||||
{
|
||||
source: []int16{1},
|
||||
result: pgtype.Int4Array{
|
||||
Elements: []pgtype.Int4{{Int: 1, Status: pgtype.Present}},
|
||||
Dimensions: []pgtype.ArrayDimension{{LowerBound: 1, Length: 1}},
|
||||
Status: pgtype.Present},
|
||||
},
|
||||
{
|
||||
source: []int{1},
|
||||
result: pgtype.Int4Array{
|
||||
@@ -98,6 +105,13 @@ func TestInt4ArraySet(t *testing.T) {
|
||||
Dimensions: []pgtype.ArrayDimension{{LowerBound: 1, Length: 1}},
|
||||
Status: pgtype.Present},
|
||||
},
|
||||
{
|
||||
source: []uint16{1},
|
||||
result: pgtype.Int4Array{
|
||||
Elements: []pgtype.Int4{{Int: 1, Status: pgtype.Present}},
|
||||
Dimensions: []pgtype.ArrayDimension{{LowerBound: 1, Length: 1}},
|
||||
Status: pgtype.Present},
|
||||
},
|
||||
{
|
||||
source: (([]int32)(nil)),
|
||||
result: pgtype.Int4Array{Status: pgtype.Null},
|
||||
|
||||
Reference in New Issue
Block a user