@Test void label() { CastBuilder<String> builder = new CastBuilder<>(expression); TypedExpression<Integer> sut = builder.asInteger(); when(scope.newLabel()).thenReturn(345L); String result = sut.label(scope); assertThat(result, is("cast_345")); verifyZeroInteractions(expression, scope, dialect, database, resultSet); }
@Override public String label(Scope scope) { return labelGenerator.label(scope); }
CastExpression implements TypedExpression<T> { @Override public String label(Scope scope) { return labelGenerator.label(scope); } }
CastExpression implements TypedExpression<T> { @Override public String label(Scope scope) { return labelGenerator.label(scope); } CastExpression(TypedExpression<F> from, DataType<T> to, DbTypeId<T> toType, BiFunction<DbType<T>,Database,String> toSql); }
CastExpression implements TypedExpression<T> { @Override public String label(Scope scope) { return labelGenerator.label(scope); } CastExpression(TypedExpression<F> from, DataType<T> to, DbTypeId<T> toType, BiFunction<DbType<T>,Database,String> toSql); @Override String label(Scope scope); @Override RowMapper<T> rowMapper(Scope scope, Optional<String> label); @Override TypeToken<T> type(); @Override String sql(Scope scope); @Override Stream<Object> args(Scope scope); @Override Precedence precedence(); @Override String toString(); }
CastExpression implements TypedExpression<T> { @Override public String label(Scope scope) { return labelGenerator.label(scope); } CastExpression(TypedExpression<F> from, DataType<T> to, DbTypeId<T> toType, BiFunction<DbType<T>,Database,String> toSql); @Override String label(Scope scope); @Override RowMapper<T> rowMapper(Scope scope, Optional<String> label); @Override TypeToken<T> type(); @Override String sql(Scope scope); @Override Stream<Object> args(Scope scope); @Override Precedence precedence(); @Override String toString();  }