2
0

Add pgtype.ByteaArray

Also fix up quoting array elements for text arrays.
This commit is contained in:
Jack Christensen
2017-03-11 13:32:32 -06:00
parent e654d1f0fc
commit 86620c5e91
17 changed files with 437 additions and 76 deletions
+4 -4
View File
@@ -25,12 +25,12 @@ func TestTextArrayTranscode(t *testing.T) {
&pgtype.TextArray{Status: pgtype.Null},
&pgtype.TextArray{
Elements: []pgtype.Text{
pgtype.Text{String: "bar", Status: pgtype.Present},
pgtype.Text{String: "baz", Status: pgtype.Present},
pgtype.Text{String: "quz", Status: pgtype.Present},
pgtype.Text{String: "bar ", Status: pgtype.Present},
pgtype.Text{String: "NuLL", Status: pgtype.Present},
pgtype.Text{String: `wow"quz\`, Status: pgtype.Present},
pgtype.Text{String: "", Status: pgtype.Present},
pgtype.Text{Status: pgtype.Null},
pgtype.Text{String: "foo", Status: pgtype.Present},
pgtype.Text{String: "null", Status: pgtype.Present},
},
Dimensions: []pgtype.ArrayDimension{{Length: 3, LowerBound: 1}, {Length: 2, LowerBound: 1}},
Status: pgtype.Present,