mirror of https://gitee.com/bigwinds/arangodb
Cleanup: killall tabs.
This commit is contained in:
parent
2bf01eae1b
commit
8da5a6c0b3
|
@ -62,7 +62,7 @@ void FreeCoordinatorCollection (TRI_vocbase_col_t* collection) {
|
|||
/// @brief convert a collection info into a TRI_vocbase_col_t
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
TRI_vocbase_col_t* CoordinatorCollection (TRI_vocbase_t* vocbase,
|
||||
CollectionInfo const& ci) {
|
||||
CollectionInfo const& ci) {
|
||||
TRI_vocbase_col_t* c = static_cast<TRI_vocbase_col_t*>(TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, sizeof(TRI_vocbase_col_t), false));
|
||||
|
||||
if (c == nullptr) {
|
||||
|
@ -109,8 +109,8 @@ TRI_vocbase_col_t* CoordinatorCollection (TRI_vocbase_t* vocbase,
|
|||
/// @brief check if a name belongs to a collection
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool EqualCollection (CollectionNameResolver const* resolver,
|
||||
string const& collectionName,
|
||||
TRI_vocbase_col_t const* collection) {
|
||||
string const& collectionName,
|
||||
TRI_vocbase_col_t const* collection) {
|
||||
if (collectionName == StringUtils::itoa(collection->_cid)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -210,4 +210,3 @@ v8::Handle<v8::Object> WrapCollection (TRI_vocbase_col_t const* collection) {
|
|||
|
||||
return scope.Close(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -514,7 +514,7 @@ static v8::Handle<v8::Value> DocumentVocbaseCol (bool useCollection,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TRI_vocbase_col_t const* UseCollection (v8::Handle<v8::Object> collection,
|
||||
v8::Handle<v8::Object>* err) {
|
||||
v8::Handle<v8::Object>* err) {
|
||||
|
||||
int res = TRI_ERROR_INTERNAL;
|
||||
TRI_vocbase_col_t* col = TRI_UnwrapClass<TRI_vocbase_col_t>(collection, WRP_VOCBASE_COL_TYPE);
|
||||
|
|
|
@ -50,16 +50,16 @@ void ReleaseCollection (TRI_vocbase_col_t const* collection);
|
|||
/// @brief convert a collection info into a TRI_vocbase_col_t
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
TRI_vocbase_col_t* CoordinatorCollection (TRI_vocbase_t* vocbase,
|
||||
triagens::arango::CollectionInfo const& ci);
|
||||
triagens::arango::CollectionInfo const& ci);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief check if a name belongs to a collection
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool EqualCollection (triagens::arango::CollectionNameResolver const* resolver,
|
||||
std::string const& collectionName,
|
||||
TRI_vocbase_col_t const* collection);
|
||||
std::string const& collectionName,
|
||||
TRI_vocbase_col_t const* collection);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief wraps a TRI_vocbase_col_t
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
v8::Handle<v8::Object> WrapCollection (TRI_vocbase_col_t const* collection);
|
||||
|
|
|
@ -590,11 +590,11 @@ static v8::Handle<v8::Value> JS_ForgetApplierReplication (v8::Arguments const& a
|
|||
|
||||
|
||||
void TRI_InitV8replication (v8::Handle<v8::Context> context,
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g){
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g){
|
||||
|
||||
// replication functions. not intended to be used by end users
|
||||
TRI_AddGlobalFunctionVocbase(context, "REPLICATION_LOGGER_STATE", JS_StateLoggerReplication, true);
|
||||
|
|
|
@ -139,9 +139,9 @@ static bool ParseDocumentHandle (v8::Handle<v8::Value> const arg,
|
|||
/// @brief parse document or document handle from a v8 value (string | object)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool ExtractDocumentHandle (v8::Handle<v8::Value> const val,
|
||||
string& collectionName,
|
||||
TRI_voc_key_t& key,
|
||||
TRI_voc_rid_t& rid) {
|
||||
string& collectionName,
|
||||
TRI_voc_key_t& key,
|
||||
TRI_voc_rid_t& rid) {
|
||||
// reset the collection identifier and the revision
|
||||
collectionName = "";
|
||||
rid = 0;
|
||||
|
@ -156,7 +156,7 @@ bool ExtractDocumentHandle (v8::Handle<v8::Value> const val,
|
|||
TRI_v8_global_t* v8g = static_cast<TRI_v8_global_t*>(v8::Isolate::GetCurrent()->GetData());
|
||||
|
||||
v8::Handle<v8::Object> obj = val->ToObject();
|
||||
|
||||
|
||||
if (obj->Has(v8g->_IdKey)) {
|
||||
v8::Handle<v8::Value> didVal = obj->Get(v8g->_IdKey);
|
||||
|
||||
|
@ -191,5 +191,3 @@ bool ExtractDocumentHandle (v8::Handle<v8::Value> const val,
|
|||
// unknown value type. give up
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ extern int32_t const WRP_VOCBASE_COL_TYPE;
|
|||
/// @brief create a v8 document id value from the parameters
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
v8::Handle<v8::Value> V8DocumentId (std::string const& collectionName,
|
||||
std::string const& key) ;
|
||||
std::string const& key) ;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -117,8 +117,8 @@ v8::Handle<v8::Object> CreateErrorObjectAhuacatl (TRI_aql_error_t* error);
|
|||
/// @brief parse document or document handle from a v8 value (string | object)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool ExtractDocumentHandle (v8::Handle<v8::Value> const val,
|
||||
std::string& collectionName,
|
||||
TRI_voc_key_t& key,
|
||||
TRI_voc_rid_t& rid);
|
||||
std::string& collectionName,
|
||||
TRI_voc_key_t& key,
|
||||
TRI_voc_rid_t& rid);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -69,7 +69,7 @@ static int32_t const WRP_GENERAL_CURSOR_TYPE = 3;
|
|||
/// @brief function that encapsulates execution of an AQL query
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
v8::Handle<v8::Value> ExecuteQueryNativeAhuacatl (TRI_aql_context_t* context,
|
||||
TRI_json_t const* parameters) {
|
||||
TRI_json_t const* parameters) {
|
||||
v8::HandleScope scope;
|
||||
|
||||
// parse & validate
|
||||
|
@ -796,11 +796,11 @@ static v8::Handle<v8::Value> JS_DeleteCursor (v8::Arguments const& argv) {
|
|||
// generate the general cursor template
|
||||
// .............................................................................
|
||||
void TRI_InitV8cursor (v8::Handle<v8::Context> context,
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g){
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g){
|
||||
v8::Handle<v8::ObjectTemplate> rt;
|
||||
v8::Handle<v8::FunctionTemplate> ft;
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
|
|
|
@ -39,11 +39,11 @@
|
|||
/// @brief function that encapsulates execution of an AQL query
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
v8::Handle<v8::Value> ExecuteQueryCursorAhuacatl (TRI_vocbase_t* const vocbase,
|
||||
TRI_aql_context_t* const context,
|
||||
TRI_json_t const* parameters,
|
||||
bool doCount,
|
||||
uint32_t batchSize,
|
||||
double cursorTtl);
|
||||
TRI_aql_context_t* const context,
|
||||
TRI_json_t const* parameters,
|
||||
bool doCount,
|
||||
uint32_t batchSize,
|
||||
double cursorTtl);
|
||||
|
||||
void TRI_InitV8indexArangoDB (v8::Handle<v8::Context> context,
|
||||
TRI_server_t* server,
|
||||
|
@ -54,10 +54,10 @@ void TRI_InitV8indexArangoDB (v8::Handle<v8::Context> context,
|
|||
v8::Handle<v8::ObjectTemplate> ArangoDBNS);
|
||||
|
||||
extern void TRI_InitV8cursor (v8::Handle<v8::Context> context,
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
triagens::arango::JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g);
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
triagens::arango::JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1963,12 +1963,13 @@ static v8::Handle<v8::Value> JS_CreateEdgeCollectionVocbase (v8::Arguments const
|
|||
}
|
||||
|
||||
void TRI_InitV8indexArangoDB (v8::Handle<v8::Context> context,
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g,
|
||||
v8::Handle<v8::ObjectTemplate> rt){
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g,
|
||||
v8::Handle<v8::ObjectTemplate> rt){
|
||||
|
||||
TRI_AddMethodVocbase(rt, "_create", JS_CreateVocbase, true);
|
||||
TRI_AddMethodVocbase(rt, "_createEdgeCollection", JS_CreateEdgeCollectionVocbase);
|
||||
TRI_AddMethodVocbase(rt, "_createDocumentCollection", JS_CreateDocumentCollectionVocbase);
|
||||
|
@ -1977,12 +1978,13 @@ void TRI_InitV8indexArangoDB (v8::Handle<v8::Context> context,
|
|||
|
||||
|
||||
void TRI_InitV8indexCollection (v8::Handle<v8::Context> context,
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g,
|
||||
v8::Handle<v8::ObjectTemplate> rt){
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g,
|
||||
v8::Handle<v8::ObjectTemplate> rt){
|
||||
|
||||
TRI_AddMethodVocbase(rt, "dropIndex", JS_DropIndexVocbaseCol);
|
||||
TRI_AddMethodVocbase(rt, "ensureIndex", JS_EnsureIndexVocbaseCol);
|
||||
TRI_AddMethodVocbase(rt, "lookupIndex", JS_LookupIndexVocbaseCol);
|
||||
|
|
|
@ -65,11 +65,11 @@ static int const SLOT_BARRIER = 2;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static v8::Handle<v8::Object> AddBasicDocumentAttributes (
|
||||
CollectionNameResolver const* resolver,
|
||||
TRI_v8_global_t* v8g,
|
||||
TRI_voc_cid_t cid,
|
||||
TRI_df_marker_t const* marker,
|
||||
v8::Handle<v8::Object> result) {
|
||||
CollectionNameResolver const* resolver,
|
||||
TRI_v8_global_t* v8g,
|
||||
TRI_voc_cid_t cid,
|
||||
TRI_df_marker_t const* marker,
|
||||
v8::Handle<v8::Object> result) {
|
||||
TRI_ASSERT(marker != nullptr);
|
||||
|
||||
TRI_voc_rid_t rid = TRI_EXTRACT_MARKER_RID(marker);
|
||||
|
@ -446,11 +446,11 @@ static v8::Handle<v8::Value> MapGetIndexedShapedJson (uint32_t idx,
|
|||
// generate the TRI_shaped_json_t template
|
||||
// .............................................................................
|
||||
void TRI_InitV8shaped_json (v8::Handle<v8::Context> context,
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
triagens::arango::JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g){
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
triagens::arango::JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g){
|
||||
v8::Handle<v8::ObjectTemplate> rt;
|
||||
v8::Handle<v8::FunctionTemplate> ft;
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
|
|
|
@ -63,10 +63,9 @@ v8::Handle<v8::Value> TRI_WrapShapedJson (T& trx,
|
|||
}
|
||||
|
||||
void TRI_InitV8shaped_json (v8::Handle<v8::Context> context,
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
triagens::arango::JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g);
|
||||
TRI_server_t* server,
|
||||
TRI_vocbase_t* vocbase,
|
||||
triagens::arango::JSLoader* loader,
|
||||
const size_t threadNumber,
|
||||
TRI_v8_global_t* v8g);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue