Skip to content

Commit 5566f4f

Browse files
Additional rawQuery test
1 parent aa2e779 commit 5566f4f

File tree

2 files changed

+80
-59
lines changed

2 files changed

+80
-59
lines changed

.idea/workspace.xml

Lines changed: 51 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package net.zetetic.tests;
2+
3+
import net.sqlcipher.Cursor;
4+
import net.sqlcipher.database.SQLiteDatabase;
5+
6+
public class NullRawQueryTest extends SQLCipherTest {
7+
@Override
8+
public boolean execute(SQLiteDatabase database) {
9+
database.execSQL("create table t1(a,b);");
10+
database.execSQL("insert into t1(a,b) values(?, ?);", new Object[]{"one for the money", "two for the show"});
11+
Cursor cursor = database.rawQuery("select * from t1;", null);
12+
if(cursor != null){
13+
if(cursor.moveToFirst()) {
14+
String a = cursor.getString(0);
15+
String b = cursor.getString(1);
16+
cursor.close();
17+
return a.equals("one for the money") && b.equals("two for the show");
18+
}
19+
}
20+
21+
22+
return false;
23+
}
24+
25+
@Override
26+
public String getName() {
27+
return "Bind Null Raw Query Test";
28+
}
29+
}

0 commit comments

Comments
 (0)