public static IQueryable <Node> OutLinkedNodes(this Node n, BrightStarDataContext <Node> dataContext, Func <Primitive?, bool> keySelector) { return(from outLinks in n.OutLinks(keySelector).AsQueryable() join likes in dataContext on outLinks.Iri equals likes.Id.Iri select likes); }
public static IQueryable <Node> OutLinkedNodes(this Node n, BrightStarDataContext <Node> dataContext, string key, int maxRecurse = 1) { return(maxRecurse > 1 ? OutLinkedNodesRecursive(n, dataContext, x => x == key, maxRecurse) : OutLinkedNodes(n, dataContext, x => x == key)); }
public IQueryable <T> Find(IEnumerable <NodeID> keys) { var dc = new BrightStarDataContext <T>((BrightStarDataProvider)Provider); ((IHaveKeys)dc).Keys = keys; ((IHaveQueryableElements)dc).Elements = ((BrightStarDataProvider)Provider).IndexQuery(keys); return(dc); }
public static IQueryable <Node> OutLinkedNodes(this IQueryable <Node> nodes, BrightStarDataContext <Node> dataContext, Func <Primitive?, bool> keySelector, int maxRecurse = 1) { return(maxRecurse > 1 ? OutLinkedNodesRecursive(nodes, dataContext, keySelector, maxRecurse) : from n in nodes from y in n.OutLinkedNodes(dataContext, keySelector) select y); }
private static IQueryable <Node> OutLinkedNodesRecursive(this Node nodes, BrightStarDataContext <Node> dataContext, Func <Primitive?, bool> keySelector, int maxRecurse) { return(nodes.TraverseQueryable(n => OutLinkedNodes(n, dataContext, keySelector), maxRecurse)); }