Search in sources :

Example 6 with ModelAdapter

use of com.raizlabs.android.dbflow.structure.ModelAdapter in project pictureapp by EyeSeeTea.

the class MigrationTools method addColumn.

public static void addColumn(SQLiteDatabase database, Class model, String columnName, String type) {
    ModelAdapter myAdapter = FlowManager.getModelAdapter(model);
    database.execSQL(String.format(ALTER_TABLE_ADD_COLUMN, myAdapter.getTableName(), columnName, type));
}
Also used : ModelAdapter(com.raizlabs.android.dbflow.structure.ModelAdapter)

Aggregations

ModelAdapter (com.raizlabs.android.dbflow.structure.ModelAdapter)6 ContentValues (android.content.ContentValues)2 ModelViewAdapter (com.raizlabs.android.dbflow.structure.ModelViewAdapter)2 QueryModelAdapter (com.raizlabs.android.dbflow.structure.QueryModelAdapter)2 SQLiteException (android.database.sqlite.SQLiteException)1 Uri (android.net.Uri)1 QueryBuilder (com.raizlabs.android.dbflow.sql.QueryBuilder)1 DefaultTransactionManager (com.raizlabs.android.dbflow.structure.database.transaction.DefaultTransactionManager)1