0

我正在迁移所有与 sql 相关的代码以使用 Sqlbrite。目前我的代码看起来像这样:

Cursor cursor;
String name;
String[] selectionArgs = { name };
cursor = database.query(MySQLiteHelper.TABLE_USER, new String[] {"id"}, "name = ? COLLATE NOCASE AND ", selectionArgs, null, null, null);

现在我需要使用SqlBrite,但我想使用Prepared Statement。有什么办法可以做到这一点吗?我用谷歌搜索了“SqlBrite PreparedStatement”,但找不到任何关于此的内容。

4

1 回答 1

1

executeInsert是的,您可以executeUpdateDeleteBriteDatabase. 他们接受 aSQLiteStatement作为参数。

于 2017-03-02T16:12:20.853 回答