Android Open Source - android-concurrent-database Database Utils






From Project

Back to project page android-concurrent-database.

License

The source code is released under:

MIT License

If you think the Android project android-concurrent-database listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.dd.database.utils;
/*from w ww  .  j a  v  a2 s  . c  o  m*/
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class DatabaseUtils {

    public static int delete(SQLiteDatabase database, DatabaseParams.Delete params) {
        return database.delete(params.table, params.whereClause, params.whereArgs);
    }

    public static long insert(SQLiteDatabase database, DatabaseParams.Insert params) {
        return database.insert(params.table, params.nullColumnHack, params.values);
    }

    public static Cursor select(SQLiteDatabase database, DatabaseParams.Select params) {
        return database.query(params.distinct, params.table, params.columns, params.selection,
                params.selectionArgs, params.groupBy, params.having, params.orderBy, params.limit);
    }

    public static int update(SQLiteDatabase database, DatabaseParams.Update params) {
        return database.update(params.table, params.values, params.whereClause, params.whereArgs);
    }

    public static Cursor rawQuery(SQLiteDatabase database, String sql, String[] selectionArgs) {
        return database.rawQuery(sql, selectionArgs);
    }
}




Java Source Code List

com.dd.database.DatabaseManager.java
com.dd.database.QueryExecutor.java
com.dd.database.utils.DatabaseParams.java
com.dd.database.utils.DatabaseUtils.java
com.dd.utils.L.java