Can i have a documentation as to how the LINQ Queries of Microsoft .NET can be used to query on Couchbase Lite


Are the LINQ Queries of Microsoft .Net fully supported by Couchbase Lite Now .

If so can i have the documentation as to how can i use them to query the JSON Documents stored on couchbase Lite

Also if in Couchbase Lite one document refers another document how can i access the data referred in the second document . As we dont have JOIN (N1QL Concept) , what are the other ways other the Map/Reduce Views so that i can access the referred document in Couchbase Lite .

Are Map?Reduce views as strong and capable enough as compared to N1QL Queries


LINQ is not supported yet, although we’re actively investigating supporting it.

If one document refers to another (contains its document ID) you can access the second document’s data by calling Database.documentWithID. In a view you can emit the linked documentID as part of the row value, so you can get to the linked doc directly from the query without having to load the original doc.

Map/reduce is just as capable as N1QL; it’s just lower-level. You can think of views as being like the indexes created in a relational database. (They’re actually more powerful because they can index arbitrary computed properties of documents.) Complex queries in N1QL or SQL operate by fetching from one or more indexes and post-processing the results in memory; the difference with map/reduce is that you would need to do the comparable post-processing yourself in app code.

For example, a join is implemented by querying one index, then using the resulting foreign keys to query another index (usually the implicit primary-key index.) That’s basically what I described in the first paragraph.


LINQ is not in any official release yet but it has found its way into the code base. I compiled the details here