@Test public void prependTo_prependsProperSql() { RenameToImpl renameTo = new RenameToImpl("table", mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); renameTo.prependTo(builder); assertThat(builder.toString(), is("RENAME TO table")); }
@Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mNewTableName).prepend("RENAME TO "); }
RenameToImpl extends BaseFinishedStatement implements RenameTo { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mNewTableName).prepend("RENAME TO "); } }
RenameToImpl extends BaseFinishedStatement implements RenameTo { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mNewTableName).prepend("RENAME TO "); } RenameToImpl(@NotNull final String newTableName, @NotNull final SqlPart previous); }
RenameToImpl extends BaseFinishedStatement implements RenameTo { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mNewTableName).prepend("RENAME TO "); } RenameToImpl(@NotNull final String newTableName, @NotNull final SqlPart previous); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous(); }
RenameToImpl extends BaseFinishedStatement implements RenameTo { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mNewTableName).prepend("RENAME TO "); } RenameToImpl(@NotNull final String newTableName, @NotNull final SqlPart previous); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }