mirror of https://gitee.com/bigwinds/arangodb
added '--server none' option
This commit is contained in:
parent
65336e093a
commit
759d75bf1b
|
@ -117,11 +117,6 @@ string const& JSLoader::findScript (string const& name) {
|
|||
|
||||
for (size_t i = 0; i < parts.size(); i++) {
|
||||
char* filename = TRI_Concatenate2File(parts.at(i).c_str(), name.c_str());
|
||||
if (!filename) {
|
||||
LOGGER_ERROR << "out-of-memory";
|
||||
return empty;
|
||||
}
|
||||
|
||||
char* result = TRI_SlurpFile(filename);
|
||||
|
||||
if (result == 0 && (i == parts.size() - 1)) {
|
||||
|
@ -154,6 +149,7 @@ bool JSLoader::loadScript (v8::Persistent<v8::Context> context, string const& na
|
|||
map<string, string>::iterator i = _scripts.find(name);
|
||||
|
||||
if (i == _scripts.end()) {
|
||||
LOGGER_ERROR << "unknown script '" << name << "'";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -2123,19 +2123,22 @@ helpExtended = TRI_CreateHelpHeadline("More help") +
|
|||
|
||||
try {
|
||||
|
||||
// default databases
|
||||
db = new AvocadoDatabase(avocado);
|
||||
edges = new AvocadoEdges(avocado);
|
||||
if (typeof avocado !== 'undefined') {
|
||||
|
||||
// load collection data
|
||||
db._collections();
|
||||
edges._collections();
|
||||
// default databases
|
||||
db = new AvocadoDatabase(avocado);
|
||||
edges = new AvocadoEdges(avocado);
|
||||
|
||||
// export to internal
|
||||
ModuleCache["/internal"].exports.db = db;
|
||||
ModuleCache["/internal"].exports.edges = db;
|
||||
// load collection data
|
||||
db._collections();
|
||||
edges._collections();
|
||||
|
||||
print(HELP);
|
||||
// export to internal
|
||||
ModuleCache["/internal"].exports.db = db;
|
||||
ModuleCache["/internal"].exports.edges = db;
|
||||
|
||||
print(HELP);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
print(err);
|
||||
|
|
|
@ -2124,19 +2124,22 @@ static string JS_client_client =
|
|||
"\n"
|
||||
"try {\n"
|
||||
"\n"
|
||||
" // default databases\n"
|
||||
" db = new AvocadoDatabase(avocado);\n"
|
||||
" edges = new AvocadoEdges(avocado);\n"
|
||||
" if (typeof avocado !== 'undefined') {\n"
|
||||
"\n"
|
||||
" // load collection data\n"
|
||||
" db._collections();\n"
|
||||
" edges._collections();\n"
|
||||
" // default databases\n"
|
||||
" db = new AvocadoDatabase(avocado);\n"
|
||||
" edges = new AvocadoEdges(avocado);\n"
|
||||
"\n"
|
||||
" // export to internal\n"
|
||||
" ModuleCache[\"/internal\"].exports.db = db;\n"
|
||||
" ModuleCache[\"/internal\"].exports.edges = db;\n"
|
||||
" // load collection data\n"
|
||||
" db._collections();\n"
|
||||
" edges._collections();\n"
|
||||
"\n"
|
||||
" print(HELP);\n"
|
||||
" // export to internal\n"
|
||||
" ModuleCache[\"/internal\"].exports.db = db;\n"
|
||||
" ModuleCache[\"/internal\"].exports.edges = db;\n"
|
||||
"\n"
|
||||
" print(HELP);\n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
"catch (err) {\n"
|
||||
" print(err);\n"
|
||||
|
|
Loading…
Reference in New Issue