1
0
Fork 0

Added a helper to build an index from VelocyPack description

This commit is contained in:
Michael Hackstein 2015-12-07 14:23:05 +01:00
parent 36c41c5e14
commit 5dce6b512f
2 changed files with 21 additions and 0 deletions

View File

@ -2662,6 +2662,18 @@ size_t TRI_DocumentIteratorDocumentCollection (triagens::arango::Transaction* tr
return nrUsed;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief create an index, based on a VelocyPack description
////////////////////////////////////////////////////////////////////////////////
int TRI_FromVelocyPackIndexDocumentCollection (triagens::arango::Transaction* trx,
TRI_document_collection_t* document,
VPackSlice const& slice,
triagens::arango::Index** idx) {
std::unique_ptr<TRI_json_t> json(triagens::basics::VelocyPackHelper::velocyPackToJson(slice));
return TRI_FromJsonIndexDocumentCollection(trx, document, json.get(), idx);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief create an index, based on a JSON description
////////////////////////////////////////////////////////////////////////////////

View File

@ -790,6 +790,15 @@ void TRI_UpdateRevisionDocumentCollection (TRI_document_collection_t*,
bool TRI_IsFullyCollectedDocumentCollection (TRI_document_collection_t*);
////////////////////////////////////////////////////////////////////////////////
/// @brief create an index, based on a VelocyPack description
////////////////////////////////////////////////////////////////////////////////
int TRI_FromVelocyPackIndexDocumentCollection (triagens::arango::Transaction*,
TRI_document_collection_t*,
VPackSlice const&,
triagens::arango::Index**);
////////////////////////////////////////////////////////////////////////////////
/// @brief create an index, based on a JSON description
////////////////////////////////////////////////////////////////////////////////