// MongoJS.h #pragma once #include #include #include #include #include "mongo/client/dbclient.h" void installMongoGlobals( v8::Handle& global ); // the actual globals v8::Handle mongoInject(const v8::Arguments& args); // utils v8::Local mongoToV8( mongo::BSONObj & m , bool array = 0 ); mongo::BSONObj v8ToMongo( v8::Handle o ); mongo::DBClientConnection * getConnection( const v8::Arguments& args ); // Mongo members v8::Handle mongoInit(const v8::Arguments& args); v8::Handle mongoFind(const v8::Arguments& args); v8::Handle mongoInsert(const v8::Arguments& args); v8::Handle mongoRemove(const v8::Arguments& args); v8::Handle mongoUpdate(const v8::Arguments& args); v8::Handle internalCursorCons(const v8::Arguments& args); v8::Handle internalCursorNext(const v8::Arguments& args); v8::Handle internalCursorHasNext(const v8::Arguments& args); // DB members v8::Handle dbInit(const v8::Arguments& args); v8::Handle collectionInit( const v8::Arguments& args ); v8::Handle objectIdInit( const v8::Arguments& args ); v8::Handle dbQueryInit( const v8::Arguments& args ); v8::Handle dbQueryIndexAccess( uint32_t index , const v8::AccessorInfo& info ); v8::Handle collectionFallback( v8::Local name, const v8::AccessorInfo &info); v8::Function * getNamedCons( const char * name ); v8::Function * getObjectIdCons();