craiggwilson / fluent-mongo

Provides a fluent interface on top of the 10gen driver including Linq.
172 stars 28 forks source link

$all support for Linq #7

Open oliverw opened 13 years ago

oliverw commented 13 years ago

It would be nice if $all would be supported using Linq.

craiggwilson commented 13 years ago

I began to implement this feature but after getting into it, figured out that this type of query isn't supported by mongodb. In other words, there is no way to accomplish this.

Do you have any ideas on how it can be implemented?

oliverw commented 13 years ago

Hmm I was referring to this:

http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24all

craiggwilson commented 13 years ago

Yeah, I thought so. That doesn't translate into the "All" linq method. In fact, I don't think it translates into a linq method at all. How do you propose this be supported?

oliverw commented 13 years ago

Hehe but I wasn't referring the Linq All() method but functionality equivalent to what the MongoDb $all operator does :)

craiggwilson commented 13 years ago

Yeah, I got that after you answered.

Still, my question remains, what syntax would you like to support this type of query? I don't think there are any built-in operators that do this.

oliverw commented 13 years ago

I'm no expert in writing Linq Providers. Couldn't that go into an extension method in a driver specific class?

craiggwilson commented 13 years ago

Ok, so you're asking for this in a way that would translate to other linq providers. I'll mark this as a feature request.