Lines Matching defs:db
48 private static final String DATABASE_NAME = "grants.db";
223 private boolean hasGrantInternal(final SQLiteDatabase db, final int uid, final String alias) {
224 final long numMatches = DatabaseUtils.longForQuery(db, SELECTION_COUNT_OF_MATCHING_GRANTS,
229 private void setGrantInternal(final SQLiteDatabase db,
232 if (!hasGrantInternal(db, uid, alias)) {
236 db.insert(TABLE_GRANTS, GRANTS_ALIAS, values);
239 db.delete(TABLE_GRANTS, SELECT_GRANTS_BY_UID_AND_ALIAS,
244 private void removeAllGrants(final SQLiteDatabase db) {
245 db.delete(TABLE_GRANTS, null /* whereClause */, null /* whereArgs */);
254 public void onCreate(final SQLiteDatabase db) {
255 db.execSQL("CREATE TABLE " + TABLE_GRANTS + " ( "
262 public void onUpgrade(final SQLiteDatabase db, int oldVersion, final int newVersion) {
288 final SQLiteDatabase db = mDatabaseHelper.getWritableDatabase();
290 db.beginTransaction();
292 cursor = db.query(TABLE_GRANTS,
302 db.delete(TABLE_GRANTS, SELECTION_GRANTS_BY_UID,
305 db.setTransactionSuccessful();
310 db.endTransaction();