mfenniak / rethinkdb-net

A C# / .NET client driver for RethinkDB.
Other
247 stars 37 forks source link

RethinkDb.Query should return interfaces for all operations #134

Closed mfenniak closed 11 years ago

mfenniak commented 11 years ago

Because I don't believe that client applications should have to reference the QueryTerm namespace, I think it would make sense for Query's static and extension methods to always return interfaces. The QueryTerm namespace in my opinion is logically internal/private, but is exposed publicly because I think it's plausible for the rare user to need to extend or create new query terms.

karlgrz commented 11 years ago

All this time I thought it did just return interfaces. Your email the other day confused me until I actually read the code again. I'm all for this.

On Fri, Sep 20, 2013 at 9:10 AM, Mathieu Fenniak notifications@github.comwrote:

Because I don't believe that client applications should have to reference the QueryTerm namespace, I think it would make sense for Query's static and extension methods to always return interfaces. The QueryTerm namespace in my opinion is logically internal/private, but is exposed publicly because I think it's plausible for the rare user to need to extend or create new query terms.

— Reply to this email directly or view it on GitHubhttps://github.com/mfenniak/rethinkdb-net/issues/134 .

mfenniak commented 11 years ago

I love this change. I think originally I had put the concrete class references into Query because I kept changing what the interfaces were, especially when I didn't know how to actually implement some of these queries (or map them onto .NET types). Now it's a much cleaner API.