Commits

Littledot  committed 938554c

Added BaseDB.

  • Participants
  • Parent commits 74b29d5

Comments (0)

Files changed (1)

File src/nctuw/littledot/database/BaseDatabase.java

 	protected SQLiteOpenHelper DBHelper;
 	protected SQLiteDatabase db;
 
-	public void open() {
+	public BaseDatabase open() {
 		if (db == null || !db.isOpen())
 			db = DBHelper.getWritableDatabase();
+		return this;
 	}
 
 	public void close() {
 
 	public Cursor rawQuery(String sql, String[] args) {
 		Cursor cur = db.rawQuery(sql, args);
-
-		cur.moveToFirst();
 		return cur;
 	}