<commit_before>package com.maxiee.heartbeat.database.api;

import android.content.Context;

import com.maxiee.heartbeat.database.tables.EventThoughtRelationTable;
import com.maxiee.heartbeat.database.tables.ThoughtsTable;

/**
 * Created by maxiee on 15-7-8.
 */
public class DeleteThoughtByKeyApi extends BaseDBApi{
    private int mThoughtKey;

    public DeleteThoughtByKeyApi(Context context, int thoughtKey) {
        super(context);
        mThoughtKey = thoughtKey;
    }

    public void exec() {
        mDatabaseHelper.getWritableDatabase().delete(
                EventThoughtRelationTable.NAME,
                EventThoughtRelationTable.THOUGHT_ID + "=?",
                new String[] {String.valueOf(mThoughtKey)}
        );
        mDatabaseHelper.getWritableDatabase().delete(
                ThoughtsTable.NAME,
                ThoughtsTable.ID + "=?",
                new String[] {String.valueOf(mThoughtKey)}
        );
    }
}<commit_msg>DeleteThoughtByKeyApi.java: delete thought_res table as well.<commit_after>package com.maxiee.heartbeat.database.api;

import android.content.Context;

import com.maxiee.heartbeat.database.tables.EventThoughtRelationTable;
import com.maxiee.heartbeat.database.tables.ThoughtResTable;
import com.maxiee.heartbeat.database.tables.ThoughtsTable;

/**
 * Created by maxiee on 15-7-8.
 */
public class DeleteThoughtByKeyApi extends BaseDBApi{
    private int mThoughtKey;

    public DeleteThoughtByKeyApi(Context context, int thoughtKey) {
        super(context);
        mThoughtKey = thoughtKey;
    }

    public void exec() {
        mDatabaseHelper.getWritableDatabase().delete(
                EventThoughtRelationTable.NAME,
                EventThoughtRelationTable.THOUGHT_ID + "=?",
                new String[] {String.valueOf(mThoughtKey)}
        );
        mDatabaseHelper.getWritableDatabase().delete(
                ThoughtsTable.NAME,
                ThoughtsTable.ID + "=?",
                new String[] {String.valueOf(mThoughtKey)}
        );
        mDatabaseHelper.getWritableDatabase().delete(
                ThoughtResTable.NAME,
                ThoughtResTable.THOUGHT_ID + "=?",
                new String[] {String.valueOf(mThoughtKey)}
        );
    }
}
{'fraction_non_alphanumeric': 0.09919571045576407, 'fraction_numerical': 0.0035746201966041107, 'mean_word_length': 2.6525285481239806, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6990313', 'n_tokens_mistral': 671, 'n_tokens_neox': 649, 'n_words': 101}