2
0

Use pointer methods for all struct pgtypes

Now no need to no whether certain interfaces are implemented by struct or
pointer to struct.
This commit is contained in:
Jack Christensen
2017-04-14 13:08:05 -05:00
parent f418255c24
commit a8c350c77d
67 changed files with 302 additions and 302 deletions
+17 -17
View File
@@ -9,23 +9,23 @@ import (
func TestIntervalTranscode(t *testing.T) {
testutil.TestSuccessfulTranscode(t, "interval", []interface{}{
pgtype.Interval{Microseconds: 1, Status: pgtype.Present},
pgtype.Interval{Microseconds: 1000000, Status: pgtype.Present},
pgtype.Interval{Microseconds: 1000001, Status: pgtype.Present},
pgtype.Interval{Microseconds: 123202800000000, Status: pgtype.Present},
pgtype.Interval{Days: 1, Status: pgtype.Present},
pgtype.Interval{Months: 1, Status: pgtype.Present},
pgtype.Interval{Months: 12, Status: pgtype.Present},
pgtype.Interval{Months: 13, Days: 15, Microseconds: 1000001, Status: pgtype.Present},
pgtype.Interval{Microseconds: -1, Status: pgtype.Present},
pgtype.Interval{Microseconds: -1000000, Status: pgtype.Present},
pgtype.Interval{Microseconds: -1000001, Status: pgtype.Present},
pgtype.Interval{Microseconds: -123202800000000, Status: pgtype.Present},
pgtype.Interval{Days: -1, Status: pgtype.Present},
pgtype.Interval{Months: -1, Status: pgtype.Present},
pgtype.Interval{Months: -12, Status: pgtype.Present},
pgtype.Interval{Months: -13, Days: -15, Microseconds: -1000001, Status: pgtype.Present},
pgtype.Interval{Status: pgtype.Null},
&pgtype.Interval{Microseconds: 1, Status: pgtype.Present},
&pgtype.Interval{Microseconds: 1000000, Status: pgtype.Present},
&pgtype.Interval{Microseconds: 1000001, Status: pgtype.Present},
&pgtype.Interval{Microseconds: 123202800000000, Status: pgtype.Present},
&pgtype.Interval{Days: 1, Status: pgtype.Present},
&pgtype.Interval{Months: 1, Status: pgtype.Present},
&pgtype.Interval{Months: 12, Status: pgtype.Present},
&pgtype.Interval{Months: 13, Days: 15, Microseconds: 1000001, Status: pgtype.Present},
&pgtype.Interval{Microseconds: -1, Status: pgtype.Present},
&pgtype.Interval{Microseconds: -1000000, Status: pgtype.Present},
&pgtype.Interval{Microseconds: -1000001, Status: pgtype.Present},
&pgtype.Interval{Microseconds: -123202800000000, Status: pgtype.Present},
&pgtype.Interval{Days: -1, Status: pgtype.Present},
&pgtype.Interval{Months: -1, Status: pgtype.Present},
&pgtype.Interval{Months: -12, Status: pgtype.Present},
&pgtype.Interval{Months: -13, Days: -15, Microseconds: -1000001, Status: pgtype.Present},
&pgtype.Interval{Status: pgtype.Null},
})
}