@Test public void prependTo_multipleItems_prependsProperSql() { ValuesImpl values = new ValuesImpl(new Object[] {"a", "b", "c"}, mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); values.prependTo(builder); assertThat(builder.toString(), is("VALUES (?,?,?)")); }
@Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(')'); for (int i = mExpressions.length - 1; i >= 0; i--) { builder.prepend('?'); if (i > 0) { builder.prepend(","); } } builder.prepend("VALUES ("); }
ValuesImpl extends BaseFinishedInsertStatement implements Values { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(')'); for (int i = mExpressions.length - 1; i >= 0; i--) { builder.prepend('?'); if (i > 0) { builder.prepend(","); } } builder.prepend("VALUES ("); } }
ValuesImpl extends BaseFinishedInsertStatement implements Values { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(')'); for (int i = mExpressions.length - 1; i >= 0; i--) { builder.prepend('?'); if (i > 0) { builder.prepend(","); } } builder.prepend("VALUES ("); } ValuesImpl(@NotNull final Object[] expressions, @NotNull final InsertColumnsImpl previous);   ValuesImpl(@NotNull final Object[] expressions, @NotNull final SqlPart previous); }
ValuesImpl extends BaseFinishedInsertStatement implements Values { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(')'); for (int i = mExpressions.length - 1; i >= 0; i--) { builder.prepend('?'); if (i > 0) { builder.prepend(","); } } builder.prepend("VALUES ("); } ValuesImpl(@NotNull final Object[] expressions, @NotNull final InsertColumnsImpl previous);   ValuesImpl(@NotNull final Object[] expressions, @NotNull final SqlPart previous); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override Object[] getArguments(); @Nullable @Override SqlPart previous(); }
ValuesImpl extends BaseFinishedInsertStatement implements Values { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(')'); for (int i = mExpressions.length - 1; i >= 0; i--) { builder.prepend('?'); if (i > 0) { builder.prepend(","); } } builder.prepend("VALUES ("); } ValuesImpl(@NotNull final Object[] expressions, @NotNull final InsertColumnsImpl previous);   ValuesImpl(@NotNull final Object[] expressions, @NotNull final SqlPart previous); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override Object[] getArguments(); @Nullable @Override SqlPart previous();  }