mirror of https://gitee.com/bigwinds/arangodb
Added a helper to build an index from VelocyPack description
This commit is contained in:
parent
36c41c5e14
commit
5dce6b512f
|
@ -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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue