<commit_before>package com.raizlabs.android.dbflow.sql.migration;

import android.database.sqlite.SQLiteDatabase;

import com.raizlabs.android.dbflow.sql.Query;
import com.raizlabs.android.dbflow.sql.QueryBuilder;
import com.raizlabs.android.dbflow.sql.builder.Condition;
import com.raizlabs.android.dbflow.sql.builder.ConditionQueryBuilder;
import com.raizlabs.android.dbflow.sql.language.Update;
import com.raizlabs.android.dbflow.structure.Model;

/**
 * Description: Provides a simple way to update a table's field or fields quickly in a migration.
 * It ties an SQLite {@link com.raizlabs.android.dbflow.sql.language.Update}
 * to migrations whenever we want to batch update tables in a structured manner.
 */
public class UpdateTableMigration<ModelClass extends Model> extends BaseMigration implements Query {

    /**
     * The table to update
     */
    private final Class<ModelClass> table;

    /**
     * The query to use
     */
    private QueryBuilder query;

    /**
     * Builds the conditions for the WHERE part of our query
     */
    private ConditionQueryBuilder<ModelClass> whereConditionQueryBuilder;

    /**
     * The conditions to use to set fields in the update query
     */
    private ConditionQueryBuilder<ModelClass> setConditionQueryBuilder;

    /**
     * Creates an update migration.
     *
     * @param table The table to update
     */
    public UpdateTableMigration(Class<ModelClass> table) {
        this.table = table;
    }

    /**
     * This will append a SET columnName = value to this migration. It will execute each of these in succession with the order
     * that this is called.
     *
     * @param conditions The condition to append
     */
    public UpdateTableMigration<ModelClass> set(Condition... conditions) {
        if (setConditionQueryBuilder == null) {
            setConditionQueryBuilder = new ConditionQueryBuilder<>(table);
        }

        setConditionQueryBuilder.addConditions(conditions);
        return this;
    }

    public UpdateTableMigration<ModelClass> where(Condition... conditions) {<commit_msg>fixed params from Condition to SQLCondition<commit_after>package com.raizlabs.android.dbflow.sql.migration;

import android.database.sqlite.SQLiteDatabase;

import com.raizlabs.android.dbflow.sql.Query;
import com.raizlabs.android.dbflow.sql.QueryBuilder;
import com.raizlabs.android.dbflow.sql.builder.ConditionQueryBuilder;
import com.raizlabs.android.dbflow.sql.builder.SQLCondition;
import com.raizlabs.android.dbflow.sql.language.Update;
import com.raizlabs.android.dbflow.structure.Model;

/**
 * Description: Provides a simple way to update a table's field or fields quickly in a migration.
 * It ties an SQLite {@link com.raizlabs.android.dbflow.sql.language.Update}
 * to migrations whenever we want to batch update tables in a structured manner.
 */
public class UpdateTableMigration<ModelClass extends Model> extends BaseMigration implements Query {

    /**
     * The table to update
     */
    private final Class<ModelClass> table;

    /**
     * The query to use
     */
    private QueryBuilder query;

    /**
     * Builds the conditions for the WHERE part of our query
     */
    private ConditionQueryBuilder<ModelClass> whereConditionQueryBuilder;

    /**
     * The conditions to use to set fields in the update query
     */
    private ConditionQueryBuilder<ModelClass> setConditionQueryBuilder;

    /**
     * Creates an update migration.
     *
     * @param table The table to update
     */
    public UpdateTableMigration(Class<ModelClass> table) {
        this.table = table;
    }

    /**
     * This will append a condition to this migration. It will execute each of these in succession with the order
     * that this is called.
     *
     * @param conditions The conditions to append
     */
    public UpdateTableMigration<ModelClass> set(SQLCondition... conditions) {
        if (setConditionQueryBuilder == null) {
            setConditionQueryBuilder = new ConditionQueryBuilder<>(table);
        }

        setConditionQueryBuilder.addConditions(conditions);
        return this;
    }

    public UpdateTableMigration<ModelClass> where(SQLCondition... conditions) {
{'fraction_non_alphanumeric': 0.08359133126934984, 'fraction_numerical': 0.0, 'mean_word_length': 3.2726347914547302, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7325411', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1137, 'n_words': 333}