public Cursor getMeaning(String text)
{
Cursor c= myDataBase.rawQuery("SELECT eng_definition,example,synonyms,antonyms FROM words WHERE pah_word = ('"+text+"')",null);
return c;
}
public Cursor getSuggestions(String text)
{
Cursor c= myDataBase.rawQuery("SELECT _id, pah_word FROM words WHERE pah_word LIKE '"+text+"%' LIMIT 40",null);
return c;
}
public void insertHistory(String text)
{
myDataBase.execSQL("INSERT INTO history(word) VALUES(('"+text+"'))");
}
public Cursor getHistory()
{
Cursor c= myDataBase.rawQuery("select distinct word, en_definition from history h join words w on h.word==w.pah_word order by h._id desc",null);
return c;
}
public void deleteHistory()
{
myDataBase.execSQL("DELETE FROM history");
}`