Add support for EXTRACT time/date function.
This commit is contained in:
parent
bc776f947b
commit
2101088d0e
15 changed files with 222 additions and 14 deletions
|
|
@ -224,6 +224,12 @@ 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)
|
||||
func EXTRACT(field unitType, from Expression) IntegerExpression {
|
||||
return IntExp(jet.EXTRACT(string(field), from))
|
||||
}
|
||||
|
||||
// CURRENT_DATE returns current date
|
||||
var CURRENT_DATE = jet.CURRENT_DATE
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue