[Switch] The internal implementation of IMongoQuery in MongoDB C #/. NET Driver,
MongoDB is a product between relational databases and non-relational databases. It has the most abundant functions and features like relational databases. The supported data structure is very loose and is similar to the json bjson format. Therefore, it can store complicated data types. The biggest feature of Mongo is that it supports a very powerful query language. Its syntax is a bit similar to an Object-Oriented Query Language, and almost can implement most of the functions of querying a single table similar to a relational database, it also supports data indexing.
Query. all ("name", "a", "B"); // matches the array Query with multiple elements. and (Query. EQ ("name", "a"), Query. EQ ("title", "t"); // multiple Query conditions are met at the same time. EQ ("name", "a"); // equals to Query. exists ("type", true); // determines whether the key value has a Query. GT ("value", 2); // greater than> Query. GTE ("value", 3); // greater than or equal to> = Query. in ("name", "a", "B"); // includes all specified values. You can specify different types of conditions and values. LT ("value", 9); // less than <Query. LTE ("value", 8); // less than or equal to <= Query. mod ("value", 3, 1); // divide the Query value by the first given value. If the remainder is equal to the second given value, the Query result is returned. NE ("name", "c"); // not equal to Query. nor (Array); // does not include the value Query in the Array. not ("name"); // element Condition Statement Query. notIn ("name", "a", 2); // returns a Query that does not match all the conditions in the array. or (Query. EQ ("name", "a"), Query. EQ ("title", "t"); // meets one of the Query conditions. size ("name", 2); // Query the length of the given key. type ("_ id", BsonType. objectId); // Query of the type of the given key. where (BsonJavaScript); // execute JavaScript Query. matches ("Title", str); // fuzzy query is equivalent to like -- str in SQL that can contain Regular Expressions