-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRussVocabDB.java
More file actions
29 lines (20 loc) · 825 Bytes
/
RussVocabDB.java
File metadata and controls
29 lines (20 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.murach.russvocab;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class RussVocabDB extends SQLiteOpenHelper {
public RussVocabDB( Context context, String name,SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table NOUNS(_id integer primary key autoincrement," +
" English text, Noun text )");
}
@Override
public void onUpgrade(SQLiteDatabase datab, int oldVersion, int newVersion) {
datab.execSQL("DROP TABLE IF EXISTS " + "NOUNS");
onCreate(datab);
}
}