Package org.apache.calcite.runtime
Class SqlFunctions.DateFormatFunction
java.lang.Object
org.apache.calcite.runtime.SqlFunctions.DateFormatFunction
- Enclosing class:
SqlFunctions
State for
FORMAT_DATE
, FORMAT_TIMESTAMP
,
FORMAT_DATETIME
, FORMAT_TIME
, TO_CHAR
functions.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionformatDate
(DataContext ctx, String fmtString, int date) formatTime
(DataContext ctx, String fmtString, int time) formatTimestamp
(DataContext ctx, String fmtString, long timestamp) protected final void
withElements
(FormatModel formatModel, String format, Consumer<List<FormatElement>> consumer) Given a format string and a format model, calls an action with the list of elements obtained by parsing that format string.
-
Constructor Details
-
DateFormatFunction
public DateFormatFunction()
-
-
Method Details
-
withElements
protected final void withElements(FormatModel formatModel, String format, Consumer<List<FormatElement>> consumer) Given a format string and a format model, calls an action with the list of elements obtained by parsing that format string. -
formatTimestamp
-
toChar
-
formatDate
-
formatTime
-