I've got it now. E.g. for delete you can do this:
<pre>
String sql = "DELETE FROM " + table +
(!TextUtils.isEmpty(whereClause) ? " WHERE " + whereClause :
"");
int argidx = 0;
SQLiteStatement statement = mDB.compileStatement(sql);
if (whereArgs != null) {
for (WhereArg wa : whereArgs) {
Object o = wa.getParamValueRaw();
if (o == null) {
statement.bindNull(++argidx);
} else if (o instanceof String) {
statement.bindString(++argidx, (String) o);
} else if (o instanceof Long) {
statement.bindLong(++argidx, (Long) o);
} else if (o instanceof Double) {
statement.bindDouble(++argidx, (Double) o);
} else if (o instanceof byte[]) {
statement.bindBlob(++argidx, (byte[]) o);
} else {
throw new RuntimeException("unexpected argument type);
}
}
}
try {
return statement.executeUpdateDelete();
} finally {
statement.close();
}
</pre>
--
View this message in context:
http://sqlite.1065341.n5.nabble.com/querying-with-BLOB-in-WHERE-clause-possible-tp44550p79220.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users