Search in sources :

Example 1 with SQLException

use of net.sqlcipher.SQLException in project cw-omnibus by commonsguy.

the class Provider method insert.

@Override
public Uri insert(Uri url, ContentValues initialValues) {
    long rowID = db.insert(TABLE, Constants.TITLE, initialValues);
    if (rowID > 0) {
        Uri uri = ContentUris.withAppendedId(Provider.Constants.CONTENT_URI, rowID);
        getContext().getContentResolver().notifyChange(uri, null);
        return (uri);
    }
    throw new SQLException("Failed to insert row into " + url);
}
Also used : SQLException(net.sqlcipher.SQLException) Uri(android.net.Uri)

Aggregations

Uri (android.net.Uri)1 SQLException (net.sqlcipher.SQLException)1