Implement tilted relationships to help improve performance

This commit is contained in:
April Herron
2021-01-27 09:41:38 -05:00
parent 12ffc78452
commit 06c39ad750
18 changed files with 159 additions and 50 deletions

View File

@@ -268,15 +268,14 @@ public class RelationshipServiceImpl implements RelationshipService {
@Override
public List<Relationship> findByItem(Context context, Item item) throws SQLException {
return findByItem(context, item, -1, -1);
return findByItem(context, item, -1, -1, false);
}
@Override
public List<Relationship> findByItem(Context context, Item item, Integer limit, Integer offset)
throws SQLException {
public List<Relationship> findByItem(Context context, Item item, Integer limit, Integer offset,
boolean excludeTilted) throws SQLException {
List<Relationship> list = relationshipDAO.findByItem(context, item, limit, offset);
List<Relationship> list = relationshipDAO.findByItem(context, item, limit, offset, excludeTilted);
list.sort((o1, o2) -> {
int relationshipType = o1.getRelationshipType().getLeftwardType()