|
|
|
@ -28,20 +28,22 @@ import net.micode.notes.data.Notes.NoteColumns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class NotesDatabaseHelper extends SQLiteOpenHelper {
|
|
|
|
|
private static final String DB_NAME = "note.db";
|
|
|
|
|
private static final String DB_NAME = "note.db";// 数据库名称
|
|
|
|
|
|
|
|
|
|
private static final int DB_VERSION = 4; // 数据库版本号
|
|
|
|
|
|
|
|
|
|
private static final int DB_VERSION = 4;
|
|
|
|
|
|
|
|
|
|
public interface TABLE {
|
|
|
|
|
public static final String NOTE = "note";
|
|
|
|
|
public static final String NOTE = "note";// 笔记表
|
|
|
|
|
|
|
|
|
|
public static final String DATA = "data";
|
|
|
|
|
public static final String DATA = "data"; // 数据表
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static final String TAG = "NotesDatabaseHelper";
|
|
|
|
|
private static final String TAG = "NotesDatabaseHelper";// 日志标签
|
|
|
|
|
|
|
|
|
|
private static NotesDatabaseHelper mInstance;
|
|
|
|
|
private static NotesDatabaseHelper mInstance;// 数据库帮助类实例
|
|
|
|
|
|
|
|
|
|
// 创建笔记表的 SQL 语句
|
|
|
|
|
private static final String CREATE_NOTE_TABLE_SQL =
|
|
|
|
|
"CREATE TABLE " + TABLE.NOTE + "(" +
|
|
|
|
|
NoteColumns.ID + " INTEGER PRIMARY KEY," +
|
|
|
|
|