| 2415 | |
| 2416 | |
| 2417 | bool |
| 2418 | IndexSpecIsOrderedIndex(const IndexSpec *indexSpec) |
| 2419 | { |
| 2420 | if (indexSpec->indexOptions == NULL) |
| 2421 | { |
| 2422 | return false; |
| 2423 | } |
| 2424 | |
| 2425 | bson_iter_t iter; |
| 2426 | PgbsonInitIterator(indexSpec->indexOptions, &iter); |
| 2427 | while (bson_iter_next(&iter)) |
| 2428 | { |
| 2429 | const char *key = bson_iter_key(&iter); |
| 2430 | if (IsOptionsKeyOrderedIndex(key)) |
| 2431 | { |
| 2432 | return BsonValueAsBool(bson_iter_value(&iter)); |
| 2433 | } |
| 2434 | } |
| 2435 | |
| 2436 | return false; |
| 2437 | } |
| 2438 | |
| 2439 | |
| 2440 | /* |
no test coverage detected