| 53 | } |
| 54 | |
| 55 | IndexInfo::IndexStatus indexStatus(const bson::BSONObj& indexObj) { |
| 56 | const char* statusField = indexObj.getStringField(DocLayerConstants::STATUS_FIELD); |
| 57 | if (strcmp(statusField, DocLayerConstants::INDEX_STATUS_READY) == 0) |
| 58 | return IndexInfo::IndexStatus::READY; |
| 59 | else if (strcmp(statusField, DocLayerConstants::INDEX_STATUS_BUILDING) == 0) |
| 60 | return IndexInfo::IndexStatus::BUILDING; |
| 61 | else |
| 62 | return IndexInfo::IndexStatus::INVALID; |
| 63 | } |
| 64 | |
| 65 | Reference<IndexInfo> MetadataManager::indexInfoFromObj(const bson::BSONObj& indexObj, |
| 66 | Reference<UnboundCollectionContext> cx) { |