"Go" the internal implementation of Imongoquery in MongoDB C #/. NET Driver Use of query

Source: Internet
Author: User

MongoDB is a product between a relational database and a non-relational database, and is the most versatile and most like relational database in a non-relational database. The data structure he supports is very loose and is a JSON-like Bjson format, so you can store more complex data types. MONGO's biggest feature is that the query language he supports is very powerful, and its syntax is a bit like an object-oriented query language that almost implements most of the functionality of a relational database single-table query, and also supports indexing of data.

Query.all ("name","a","b");//to match an array with multiple elementsQuery.and (Query.eq ("name","a"), Query.eq ("title","T"));//satisfy multiple conditions at the same timeQuery.eq ("name","a");//equalsQuery.exists ("type",true);//determine if a key value existsQUERY.GT ("value",2);//greater than >Query.gte ("value",3);//greater than or equal to >=Query.in ("name","a","b");//includes all values specified, you can specify different types of conditions and valuesQUERY.LT ("value",9);//less than <Query.lte ("value",8);//less than or equal to <=Query.mod ("value",3,1);//divides the query value by the first given value and returns the result if the remainder equals the second given valueQuery.ne ("name","C");//Not equal toQuery.nor (Array);//do not include values in the arrayQuery.not ("name");//element Condition StatementQuery.notin ("name","a",2);//returns a document that does not match all the conditions in the arrayQuery.or (Query.eq ("name","a"), Query.eq ("title","T"));//meet one of the conditionsQuery.size ("name",2);//the length of the given keyQuery.type ("_id", Bsontype.objectid);//the type of the given keyQuery.where (Bsonjavascript);//Execute JavaScriptQuery.matches ("Title", str);//fuzzy queries are equivalent to like in SQL--STR can contain regular expressions

"Go" the internal implementation of Imongoquery in MongoDB C #/. NET Driver Use of query

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.