This eliminates the behavior in which the lowest-valued
in-bounds index key was chosen as the sort key. After this
change, we instead choose the lowest key overall, which may
or may not be in-bounds. This change prevents the sort order
from depending on either the query predicate or the
implementation details of the query planner.
Note that it is no longer correct for a multikey index to
provide a sort over an array field. However, a non-array
field of a multikey index can provide a sort when that index
has path-level multikeyness metadata.
Remove some excess end-of-line spaces.
Clang format touched source file.
Change hash variable names to state to reflect new validate().
Add constructors to struct and utilize them in later code.
Remove unnecessary struct declaration to CollectionOptions.
Utilize constant instance of CollectionState struct.
Reorder methods to come before members.
Rename l and r iterators to thisIt and otherIt for clarity.
Conform to style by changing multiline comments to use //
Move iterator into for-loop scope instead of outside.
Change Equals suffix to Equal to better reflect variable meaning.
Add special case handling for nonexistence of collection in ==
Add assertion to check that index spec set size is equal to the vector of all indices.
Move dataHash string assignment nearer to md5 hash generation for conceptual locality.
Add changes from clang-format.py.
Convert toString() string generation from raw concat. to StringBuilder.
Add spacing for readability in cmpIndexSpecs() and fix typo.
Change colon to period in comment.
Change newline printing to semicolon printing in toString() except for indexSpecs.
Change constructor method to use more efficient one in validate() return.
Add early check for exists field; if false return message about collection not existing.
Change toStringBuilder naming of mongo::StringBuilder to sb.
Move up lhs.exists == rhs.exists check up to beginning of operator== overload.
Remove std::endl; from << overload.
Change for loop to use range-based for loop in toString().
Change index options list to index specs array.
Remove excess empty array printing for index specs in toString().
Update documentaiton of toString() to reflect changes.
Fix typo of Prints -> Returns in toString() docs.
Add visual separation between beginning if statement in toString().
Fix format issues in C++ file.
Add visual separation between beginning if statement in operator==
This change activates the compile-time checking for unused
`mongo::Status` results. A few more `transitional_ignore`
calls were needed for a few more tests which appeared.
An unused variable in Solaris caused a warning-as-error to
trigger, breaking the build. This change makes that variable's
existence predicated upon ifdef-paths which need it.
There are numerous places in the codebase where `mongo::Status` or
`mongo::StatusWith< T >` objects are returned and never checked.
Many of these are innocuous, but many of them are potentially
severe bugs. This change introduces facilities to permit
compile-time warning of unchecked `Status` and `StatusWith` usage
on clang compilers. It introduces an `ignore` function which is
useful to state that a specific "ignored status" case was
intentional. It not presently an error, in clang builds, to
forget to check a `Status` -- this will come in a later commit.
This also introduces a `transitional_ignore` function, which allows
for easy continual auditing of the codebase for current "whitelisted"
unchecked-status instances. All present "ignored status" cases
have been marked `transitional_ignore`.