Go fmt.
This commit is contained in:
parent
4e1ff65023
commit
a2ea1892e5
17 changed files with 44 additions and 43 deletions
|
|
@ -68,7 +68,7 @@ func (c *castImpl) AS_CHAR(length ...int) StringExpression {
|
|||
return StringExp(c.AS("CHAR"))
|
||||
}
|
||||
|
||||
// AS_DATE casts expression AS DATE type
|
||||
// AS_DATE casts expression AS DATE type
|
||||
func (c *castImpl) AS_DATE() DateExpression {
|
||||
return DateExp(c.AS("DATE"))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,8 @@ var REGEXP_LIKE = jet.REGEXP_LIKE
|
|||
//----------------- Date/Time Functions and Operators ------------//
|
||||
|
||||
// EXTRACT function retrieves subfields such as year or hour from date/time values
|
||||
// EXTRACT(DAY, User.CreatedAt)
|
||||
//
|
||||
// EXTRACT(DAY, User.CreatedAt)
|
||||
func EXTRACT(field unitType, from Expression) IntegerExpression {
|
||||
return IntExp(jet.EXTRACT(string(field), from))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ const (
|
|||
type Interval = jet.Interval
|
||||
|
||||
// INTERVAL creates new temporal interval.
|
||||
// In a case of MICROSECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR unit type
|
||||
// value parameter has to be a number.
|
||||
//
|
||||
// In a case of MICROSECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR unit type
|
||||
// value parameter has to be a number.
|
||||
// INTERVAL(1, DAY)
|
||||
// In a case of other unit types, value should be string with appropriate format.
|
||||
// In a case of other unit types, value should be string with appropriate format.
|
||||
// INTERVAL("10:08:50", HOUR_SECOND)
|
||||
func INTERVAL(value interface{}, unitType unitType) Interval {
|
||||
switch unitType {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue