I'm using latest version of DBFLOW
library and i'm trying to calculate sum single column as countOfNewPosts
this is my table:
public class CafeWebNewPostInformation extends BaseModel {
@PrimaryKey
@Column
public int id;
@Column
public int cafeWebServerId;
@Column
public int countOfNewPosts;
@Column
@ForeignKey(tableClass = AlachiqCafeWebs.class,
references = @ForeignKeyReference(columnName = "parentId", foreignKeyColumnName = "id"))
private int parentId;
@Column
public int lastSavedId;
@Column
public int lastRequestedId;
@Column
public int lastRetrievedId;
}
and this is my code to get that from this table:
CafeWebNewPostInformation countOfNewPost =
SQLite.select(
Method.sum(CafeWebNewPostInformation_Table.countOfNewPosts).as("count")
)
.from(CafeWebNewPostInformation.class).querySingle();
i dont get any error and this is result of that:
ScreenShot:
what happen and where is count
on this result?