From 641c62098c6c45cc4ec1724f7fd7c48c6bb2a5c2 Mon Sep 17 00:00:00 2001 From: go-jet Date: Sat, 21 Dec 2019 16:50:16 +0100 Subject: [PATCH] Update comments. --- mysql/interval.go | 6 +++--- postgres/interval.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql/interval.go b/mysql/interval.go index 478e9c4..ee0354e 100644 --- a/mysql/interval.go +++ b/mysql/interval.go @@ -38,7 +38,7 @@ const ( // Interval is representation of MySQL interval type Interval = jet.Interval -// INTERVAL creates new Interval type. +// INTERVAL creates new temporal interval. // In a case of MICROSECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR unit type // value parameter should be number. For example: INTERVAL(1, DAY) // In a case of other unit types, value should be string with appropriate format. @@ -94,7 +94,7 @@ func INTERVAL(value interface{}, unitType unitType) Interval { } } -// INTERVALe creates new Interval type from expresion and unit type. +// INTERVALe creates new temporal interval from expresion and unit type. func INTERVALe(expr Expression, unitType unitType) Interval { return jet.NewInterval(jet.ListSerializer{ Serializers: []jet.Serializer{expr, jet.Raw(string(unitType))}, @@ -102,7 +102,7 @@ func INTERVALe(expr Expression, unitType unitType) Interval { }) } -// INTERVALd returns a interval representation from duration +// INTERVALd temoral interval from time.Duration func INTERVALd(duration time.Duration) Interval { var sign int64 = 1 if duration < 0 { diff --git a/postgres/interval.go b/postgres/interval.go index de659e7..80592e8 100644 --- a/postgres/interval.go +++ b/postgres/interval.go @@ -64,7 +64,7 @@ func INTERVAL(quantityAndUnit ...quantityAndUnit) IntervalExpression { return newInterval } -// INTERVALd creates interval expression from duration +// INTERVALd creates interval expression from time.Duration func INTERVALd(duration time.Duration) IntervalExpression { days, hours, minutes, seconds, microseconds := utils.ExtractDateTimeComponents(duration)