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:
+17
-17
@@ -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},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user