bson_compare man page

bson_compare ā€” bson_compare()

Synopsis

int
bson_compare (const bson_t *bson, const bson_t *other);

Parameters

Description

The bson_compare() function shall compare two bson documents for equality.

This can be useful in conjunction with _qsort()_.

If equal, 0 is returned.

TIP:

This function uses _memcmp()_ internally, so the semantics are the same.

Returns

less than zero, zero, or greater than zero in qsort() style.

Author

MongoDB, Inc

Info

Sep 15, 2017 1.8.0 Libbson