use of com.alibaba.cobar.parser.ast.expression.primary.function.datetime.Extract in project cobar by alibaba.
the class MySQLExprParser method extract.
/**
* first '(' has been consumed
*/
private Extract extract() throws SQLSyntaxErrorException {
IntervalPrimary.Unit unit = intervalPrimaryUnit();
match(KW_FROM);
Expression date = expression();
match(PUNC_RIGHT_PAREN);
Extract extract = new Extract(unit, date);
extract.setCacheEvalRst(cacheEvalRst);
return extract;
}
Aggregations