Hướng dẫn eq mongodb
Docs Home → MongoDB Manual Show $eq Specifies equality condition.
The
Specifying the For comparison of different BSON type values, see the specified BSON comparison order. If the specified If the specified The expression
When the If For examples illustrating this behaviour, see Regex Match Behaviour. Always use the explicit form The following examples query against the
The following example queries the
The query is equivalent to:
Both queries match the following documents:
The following example queries the
The query is equivalent to:
Both queries match the following document:
TipSee also:The following example queries the
The query is equivalent to:
Both queries match the following documents:
TipThe following example queries the
The query is equivalent to:
Both queries match the following documents:
The following examples demonstrate the differences in behavior between implicit and explict regular expression matching. Consider a collection with these documents: $eq match on a stringA string expands
to return the same values whether an implicit match or an explicit use of
return the following result: $eq match on a regular expressionAn explicit query using Regular expression
matchesA query with an implicit match against a regular expression is equivalent to a making a query with the
return the same results:
|