use of com.j256.ormlite.support.DatabaseConnection in project ormlite-android-extras by campnic.
the class AndroidBaseDaoImpl method getCursor.
public Cursor getCursor(PreparedQuery<T> query) throws SQLException {
DatabaseConnection readOnlyConn = connectionSource.getReadOnlyConnection();
AndroidCompiledStatement stmt = (AndroidCompiledStatement) query.compile(readOnlyConn, StatementBuilder.StatementType.SELECT);
Cursor base = stmt.getCursor();
String idColumnName = getTableInfo().getIdField().getColumnName();
int idColumnIndex = base.getColumnIndex(idColumnName);
NoIdCursorWrapper wrapper = new NoIdCursorWrapper(base, idColumnIndex);
return wrapper;
}
use of com.j256.ormlite.support.DatabaseConnection in project ormlite-android-extras by campnic.
the class AndroidBaseDaoImpl method getCursor.
public Cursor getCursor(PreparedQuery<T> query) throws SQLException {
DatabaseConnection readOnlyConn = connectionSource.getReadOnlyConnection();
AndroidCompiledStatement stmt = (AndroidCompiledStatement) query.compile(readOnlyConn, StatementBuilder.StatementType.SELECT);
Cursor base = stmt.getCursor();
String idColumnName = getTableInfo().getIdField().getColumnName();
int idColumnIndex = base.getColumnIndex(idColumnName);
NoIdCursorWrapper wrapper = new NoIdCursorWrapper(base, idColumnIndex);
return wrapper;
}
Aggregations