@Test void label() { CoalesceFunction<String> sut1 = coalesce(expression1).orElse(expression2); CoalesceFunction<String> sut2 = coalesce(expression1).orElse(expression2); when(scope.newLabel()).thenReturn(345L).thenReturn(245L); String label1 = sut1.label(scope); String label2 = sut1.label(scope); String label3 = sut2.label(scope); assertThat(label1, is("coalesce_345")); assertThat(label2, is("coalesce_345")); assertThat(label3, is("coalesce_245")); }
@Override public String label(Scope scope) { return labelGenerator.label(scope); }
CoalesceFunction implements TypedExpression<T> { @Override public String label(Scope scope) { return labelGenerator.label(scope); } }
CoalesceFunction implements TypedExpression<T> { @Override public String label(Scope scope) { return labelGenerator.label(scope); } private  CoalesceFunction(TypedExpression<T> expression); }
CoalesceFunction implements TypedExpression<T> { @Override public String label(Scope scope) { return labelGenerator.label(scope); } private  CoalesceFunction(TypedExpression<T> expression); @Override String sql(Scope scope); @Override Stream<Object> args(Scope scope); @Override Precedence precedence(); @Override String label(Scope scope); @Override RowMapper<T> rowMapper(Scope scope, Optional<String> label); @Override TypeToken<T> type(); @NotNull CoalesceFunction<T> orElse(T value); @NotNull CoalesceFunction<T> orElse(TypedExpression<T> expression); @NotNull CoalesceFunction<T> orElse(Function1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(FunctionOptional1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(String alias, Function1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(String alias, FunctionOptional1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(Alias<R> alias, Function1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(Alias<R> alias, FunctionOptional1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(TypedExpression<T> expression); @NotNull static CoalesceFunction<T> coalesce(Function1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(FunctionOptional1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(String alias, Function1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(String alias, FunctionOptional1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(Alias<R> alias, Function1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(Alias<R> alias, FunctionOptional1<R,T> methodReference); }
CoalesceFunction implements TypedExpression<T> { @Override public String label(Scope scope) { return labelGenerator.label(scope); } private  CoalesceFunction(TypedExpression<T> expression); @Override String sql(Scope scope); @Override Stream<Object> args(Scope scope); @Override Precedence precedence(); @Override String label(Scope scope); @Override RowMapper<T> rowMapper(Scope scope, Optional<String> label); @Override TypeToken<T> type(); @NotNull CoalesceFunction<T> orElse(T value); @NotNull CoalesceFunction<T> orElse(TypedExpression<T> expression); @NotNull CoalesceFunction<T> orElse(Function1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(FunctionOptional1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(String alias, Function1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(String alias, FunctionOptional1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(Alias<R> alias, Function1<R,T> methodReference); @NotNull CoalesceFunction<T> orElse(Alias<R> alias, FunctionOptional1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(TypedExpression<T> expression); @NotNull static CoalesceFunction<T> coalesce(Function1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(FunctionOptional1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(String alias, Function1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(String alias, FunctionOptional1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(Alias<R> alias, Function1<R,T> methodReference); @NotNull static CoalesceFunction<T> coalesce(Alias<R> alias, FunctionOptional1<R,T> methodReference);  }