Java Code Examples for android.database.sqlite.SQLiteDatabase.updateWithOnConflict()

The following are Jave code examples for showing how to use updateWithOnConflict() of the android.database.sqlite.SQLiteDatabase class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Android_Code_Arbiter   File: AndroidSql.java   View Source Code Vote up 5 votes
public void sampleSQLiteDatabase(SQLiteDatabase db, String input) {
    db.beginTransaction();
    //
    db.compileStatement(input);
    //query
    db.query(false, input, null, null, null, null, null, null, null);
    db.query(false, input, null, null, null, null, null, null, null, null);
    db.query(input, null, null, null, null, null, null);
    db.query(input, null, null, null, null, null, null, null);
    //queryWithFactory
    db.queryWithFactory(null, false, input, null, null, null, null,null,null, null);
    db.queryWithFactory(null, false, input, null, null, null, null,null,null, null, null);
    //rawQueryWithFactory
    db.rawQueryWithFactory(null, input, null, null);
    db.rawQueryWithFactory(null, input, null, null, null);
    //delete
    db.delete(input, null, new String[] {"1","2"});
    db.delete(null, input, new String[] {"1","2"});
    //update
    db.update(input, null, null, null);
    //updateWithOnConflict
    db.updateWithOnConflict(input, null, null, null, SQLiteDatabase.CONFLICT_ROLLBACK);
    db.updateWithOnConflict(null, null, input, null, SQLiteDatabase.CONFLICT_ABORT);
    //execSQL
    db.execSQL(input);
    db.execSQL(input,null);

    db.endTransaction();
}