@Test public void prependTo_withOnlyTableName_prependsProperSql() { DropTableImpl dropTable = new DropTableImpl(null, "table", mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); dropTable.prependTo(builder); assertThat(builder.toString(), is("TABLE table")); }
@Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("TABLE "); }
DropTableImpl extends BaseFinishedStatement implements DropTable { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("TABLE "); } }
DropTableImpl extends BaseFinishedStatement implements DropTable { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("TABLE "); } DropTableImpl(@Nullable final String databaseName, @NotNull final String tableName, @NotNull final SqlPart previous); }
DropTableImpl extends BaseFinishedStatement implements DropTable { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("TABLE "); } DropTableImpl(@Nullable final String databaseName, @NotNull final String tableName, @NotNull final SqlPart previous); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous(); }
DropTableImpl extends BaseFinishedStatement implements DropTable { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("TABLE "); } DropTableImpl(@Nullable final String databaseName, @NotNull final String tableName, @NotNull final SqlPart previous); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }