2
0

Replace Status with Valid to conform to database/sql style

https://github.com/jackc/pgx/issues/1060
This commit is contained in:
Jack Christensen
2021-08-26 22:46:13 -05:00
parent 37044f47f5
commit 11d351dd75
156 changed files with 6909 additions and 7894 deletions
+9 -9
View File
@@ -12,25 +12,25 @@ func TestJSONBArrayTranscode(t *testing.T) {
&pgtype.JSONBArray{
Elements: nil,
Dimensions: nil,
Status: pgtype.Present,
Valid: true,
},
&pgtype.JSONBArray{
Elements: []pgtype.JSONB{
{Bytes: []byte(`"foo"`), Status: pgtype.Present},
{Status: pgtype.Null},
{Bytes: []byte(`"foo"`), Valid: true},
{},
},
Dimensions: []pgtype.ArrayDimension{{Length: 2, LowerBound: 1}},
Status: pgtype.Present,
Valid: true,
},
&pgtype.JSONBArray{Status: pgtype.Null},
&pgtype.JSONBArray{},
&pgtype.JSONBArray{
Elements: []pgtype.JSONB{
{Bytes: []byte(`"foo"`), Status: pgtype.Present},
{Bytes: []byte("null"), Status: pgtype.Present},
{Bytes: []byte("42"), Status: pgtype.Present},
{Bytes: []byte(`"foo"`), Valid: true},
{Bytes: []byte("null"), Valid: true},
{Bytes: []byte("42"), Valid: true},
},
Dimensions: []pgtype.ArrayDimension{{Length: 3, LowerBound: 1}},
Status: pgtype.Present,
Valid: true,
},
})
}