From 2a24480b33b259e555c48052abd8a6132f3c6fcb Mon Sep 17 00:00:00 2001 From: Luke Stephenson Date: Mon, 8 Jun 2020 20:37:56 +1000 Subject: [PATCH] Mysql NOW function precision support The now function optionally supports a precision. https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_now --- src/main/antlr4/imports/column_definitions.g4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/antlr4/imports/column_definitions.g4 b/src/main/antlr4/imports/column_definitions.g4 index 19ed8221c..f8fa57f06 100644 --- a/src/main/antlr4/imports/column_definitions.g4 +++ b/src/main/antlr4/imports/column_definitions.g4 @@ -115,6 +115,7 @@ length: '(' INTEGER_LITERAL ')'; int_flags: ( SIGNED | UNSIGNED | ZEROFILL ); decimal_length: '(' INTEGER_LITERAL ( ',' INTEGER_LITERAL )? ')'; -now_function: NOW '(' ')'; +now_function: NOW now_function_length; +now_function_length: length | '(' ')'; current_timestamp_length: length | '(' ')'; localtime_function: (LOCALTIME | LOCALTIMESTAMP) ('(' ')')?;