public static QueryConditionList ElemMatch(
     string name,
     QueryComplete query
 )
 {
     return new QueryConditionList(name, "$elemMatch", query.ToBsonDocument());
 }
Example #2
0
 /// <summary>
 /// Adds an $elemMatch test to the query.
 /// </summary>
 /// <param name="query">The query to match elements with.</param>
 /// <returns>The builder (so method calls can be chained).</returns>
 public QueryConditionList ElemMatch(
     QueryComplete query
     )
 {
     conditions.Add("$elemMatch", query.ToBsonDocument());
     return(this);
 }
 public QueryNotConditionList ElemMatch(
     QueryComplete query
 )
 {
     conditions.Add("$elemMatch", query.ToBsonDocument());
     return this;
 }
 public QueryNotConditionList ElemMatch(
     QueryComplete query
 )
 {
     return new QueryNotConditionList(name, "$elemMatch", query.ToBsonDocument());
 }
Example #5
0
		/// <summary>
		/// Generates a $match pipeline command based upon the given query
		/// </summary>
		/// <param name="query">The query used to filter the pipeline document</param>
		public static BsonDocument Match(QueryComplete query) {
			return new BsonDocument("$match", query.ToBsonDocument());
		}
Example #6
0
 /// <summary>
 /// Adds an $elemMatch test to the query.
 /// </summary>
 /// <param name="query">The query to match elements with.</param>
 /// <returns>The builder (so method calls can be chained).</returns>
 public QueryNotConditionList ElemMatch(
     QueryComplete query
     )
 {
     return(new QueryNotConditionList(name, "$elemMatch", query.ToBsonDocument()));
 }