//Returns array public IEnumerable <int> GetLikesInRange(int postId, int count, int skip = 0) { FilterDefinition <Likes> filter = GetPostIdFilter(postId); IEnumerable <int> array = MongoArrayUtils <Likes> .ArrayIntSplice(db.Likes, USER_IDS, filter, count, skip); return(array); }
//returns a collection of PostID's that contain tag public IEnumerable <int> GetPostsByTag(string tagText, int count = 10, int skip = 0) { FilterDefinition <Tags> filter = GetTagTextFilter(tagText); IEnumerable <int> array = MongoArrayUtils <Tags> .ArrayIntSplice(db.Tags, POST_IDS, filter, count, skip); return(array); }
public IEnumerable <int> GetBookmarksInRange(int userId, int count = 10, int skip = 0) { FilterDefinition <Bookmarks> filter = GetUserIdFilter(userId); IEnumerable <int> array = MongoArrayUtils <Bookmarks> .ArrayIntSplice(db.Bookmarks, POST_IDS, filter, count, skip); return(array); }
//Retrieves a collection of Reported Posts public IEnumerable <int> GetReportedPosts(int skip = 0, int count = 10) { FilterDefinition <Reports> filter = Builders <Reports> .Filter.Eq(IS_RESOLVED, false); IEnumerable <int> array = MongoArrayUtils <Reports> .ArrayIntSplice(db.Reports, REPORTS_ARRAY, filter, count, skip); return(array); }