Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linq index #139

Closed
wants to merge 2 commits into from
Closed

Linq index #139

wants to merge 2 commits into from

Commits on Nov 18, 2012

  1. Add .Explain() extension method to IQueryable<T> to explain Linq quer…

    …ies.
    
    The extension method operates on IQueryable<T> and can therefore not operate
    on .Max, Min, First, Last or any methods that return a scalar. It can also
    not operate on .Distinct queries since they call a specific method on the
    collection and don't give us access to any cursor.
    Einar Egilsson committed Nov 18, 2012
    Copy the full SHA
    a16227a View commit details
    Browse the repository at this point in the history
  2. Added .WithIndex method to Linq queries for index hinting.

    .WithIndex can take a string or a BsonDocument as an index hint.
    It's an extension method on IQueryable<T> and returns IQueryable<T>.
    Example:
    
    var results = _collection.AsQueryable<T>.WithIndex("foo").Where(x=>x.Name == 1).ToList()
    Einar Egilsson committed Nov 18, 2012
    Copy the full SHA
    f976704 View commit details
    Browse the repository at this point in the history