@Test public void prependTo_forTable_prependsProperSql() { DeleteFromImpl deleteFrom = new DeleteFromImpl(null, "table", mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); deleteFrom.prependTo(builder); assertThat(builder.toString(), is("FROM table")); }
@Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("FROM "); }
DeleteFromImpl extends BaseFinishedDeleteStatement implements DeleteFrom { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("FROM "); } }
DeleteFromImpl extends BaseFinishedDeleteStatement implements DeleteFrom { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("FROM "); } DeleteFromImpl(@Nullable final String databaseName, @NotNull final String tableName, @NotNull final SqlPart previous); }
DeleteFromImpl extends BaseFinishedDeleteStatement implements DeleteFrom { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("FROM "); } DeleteFromImpl(@Nullable final String databaseName, @NotNull final String tableName, @NotNull final SqlPart previous); @NotNull @Override DeleteWhere where(@NotNull final String expression, @NotNull final Object... arguments); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous(); }
DeleteFromImpl extends BaseFinishedDeleteStatement implements DeleteFrom { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("FROM "); } DeleteFromImpl(@Nullable final String databaseName, @NotNull final String tableName, @NotNull final SqlPart previous); @NotNull @Override DeleteWhere where(@NotNull final String expression, @NotNull final Object... arguments); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }