-
Notifications
You must be signed in to change notification settings - Fork 881
Expand file tree
/
Copy pathDebugSQLiteDB.java
More file actions
61 lines (47 loc) · 1.43 KB
/
DebugSQLiteDB.java
File metadata and controls
61 lines (47 loc) · 1.43 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.amitshekhar.sqlite;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.SQLException;
import android.util.Log;
import net.sqlcipher.database.SQLiteDatabase;
/**
* Created by anandgaurav on 12/02/18.
*/
public class DebugSQLiteDB implements SQLiteDB {
private final SQLiteDatabase database;
public DebugSQLiteDB(SQLiteDatabase database) {
this.database = database;
}
@Override
public int delete(String table, String whereClause, String[] whereArgs) {
return database.delete(table, whereClause, whereArgs);
}
@Override
public boolean isOpen() {
return database.isOpen();
}
@Override
public void close() {
database.close();
}
@Override
public Cursor rawQuery(String sql, String[] selectionArgs) {
return database.rawQuery(sql, selectionArgs);
}
@Override
public void execSQL(String sql) throws SQLException {
database.execSQL(sql);
}
@Override
public long insert(String table, String nullColumnHack, ContentValues values) {
return database.insert(table, nullColumnHack, values);
}
@Override
public int update(String table, ContentValues values, String whereClause, String[] whereArgs) {
return database.update(table, values, whereClause, whereArgs);
}
@Override
public int getVersion() {
return database.getVersion();
}
}