Skip to content

Commit

Permalink
added derived file
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteemann committed Aug 7, 2014
1 parent cd132c1 commit 21677c9
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,12 @@ var registerFunction = function (name, code, isDeterministic) {
throw err;
}

var exists = false;

var result = db._executeTransaction({
collections: {
write: getStorage().name()
},
action: function (params) {
var exists = false;
var collection = require("internal").db._collection(params.collection);
var name = params.name;

Expand All @@ -323,7 +322,7 @@ var registerFunction = function (name, code, isDeterministic) {
};

collection.save(data);
return true;
return exists;
},
params: {
name: name,
Expand All @@ -333,11 +332,9 @@ var registerFunction = function (name, code, isDeterministic) {
}
});

if (result) {
internal.reloadAqlFunctions();
}
internal.reloadAqlFunctions();

return exists;
return result;
};

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 21677c9

Please sign in to comment.