@Test public void dayOfMonth() { when(nullRef.type()).thenReturn(DATE); when(missingRef.type()).thenReturn(DATE); FunctionExpression expression = dsl.dayofmonth(DSL.literal(new ExprDateValue("2020-07-07"))); assertEquals(INTEGER, expression.type()); assertEquals("dayofmonth(DATE '2020-07-07')", expression.toString()); assertEquals(integerValue(7), eval(expression)); assertEquals(nullValue(), eval(dsl.dayofmonth(nullRef))); assertEquals(missingValue(), eval(dsl.dayofmonth(missingRef))); }
private FunctionResolver dayOfMonth() { return define(DAYOFMONTH.getName(), impl(nullMissingHandling(DateTimeFunction::exprDayOfMonth), INTEGER, DATE) ); }
DateTimeFunction { private FunctionResolver dayOfMonth() { return define(DAYOFMONTH.getName(), impl(nullMissingHandling(DateTimeFunction::exprDayOfMonth), INTEGER, DATE) ); } }
DateTimeFunction { private FunctionResolver dayOfMonth() { return define(DAYOFMONTH.getName(), impl(nullMissingHandling(DateTimeFunction::exprDayOfMonth), INTEGER, DATE) ); }  }
DateTimeFunction { private FunctionResolver dayOfMonth() { return define(DAYOFMONTH.getName(), impl(nullMissingHandling(DateTimeFunction::exprDayOfMonth), INTEGER, DATE) ); }  void register(BuiltinFunctionRepository repository); }
DateTimeFunction { private FunctionResolver dayOfMonth() { return define(DAYOFMONTH.getName(), impl(nullMissingHandling(DateTimeFunction::exprDayOfMonth), INTEGER, DATE) ); }  void register(BuiltinFunctionRepository repository);  }