* ComparePgbson compares 2 BSON objects. */
| 292 | * ComparePgbson compares 2 BSON objects. |
| 293 | */ |
| 294 | int |
| 295 | ComparePgbson(const pgbson *leftBson, const pgbson *rightBson) |
| 296 | { |
| 297 | bson_iter_t leftIter; |
| 298 | bson_iter_t rightIter; |
| 299 | |
| 300 | if (PgbsonEquals(leftBson, rightBson)) |
| 301 | { |
| 302 | return 0; |
| 303 | } |
| 304 | |
| 305 | PgbsonInitIterator(leftBson, &leftIter); |
| 306 | PgbsonInitIterator(rightBson, &rightIter); |
| 307 | |
| 308 | const char *collationStringCurrentlyUnsupported = NULL; |
| 309 | return CompareBsonIter(&leftIter, &rightIter, true, |
| 310 | collationStringCurrentlyUnsupported); |
| 311 | } |
| 312 | |
| 313 | |
| 314 | /* |
no test coverage detected