1
0
Fork 0

Graph Refactoring: Determination of ID pushed to Common

This commit is contained in:
Lucas Dohmen 2013-10-31 12:30:14 +01:00
parent 37b7630efb
commit c7b5549b08
3 changed files with 8 additions and 8 deletions

View File

@ -253,12 +253,12 @@ Graph.prototype.drop = function () {
/// @brief saves an edge to the graph
////////////////////////////////////////////////////////////////////////////////
Graph.prototype._saveEdge = function(id, out_vertex, in_vertex, params) {
Graph.prototype._saveEdge = function(id, out_vertex_id, in_vertex_id, params) {
var results;
params._key = id;
params._from = out_vertex._properties._id;
params._to = in_vertex._properties._id;
params._from = out_vertex_id;
params._to = in_vertex_id;
results = GraphAPI.postEdge(this._properties._key, params);
return new Edge(this, results.edge);

View File

@ -729,8 +729,8 @@ Graph.prototype.getOrAddVertex = function (id) {
Graph.prototype.addEdge = function (out_vertex, in_vertex, id, label, data, waitForSync) {
return this._saveEdge(id,
out_vertex,
in_vertex,
out_vertex._properties._id,
in_vertex._properties._id,
this._prepareEdgeData(data, label),
waitForSync);
};

View File

@ -563,15 +563,15 @@ Graph.prototype.drop = function (waitForSync) {
/// @brief saves an edge to the graph
////////////////////////////////////////////////////////////////////////////////
Graph.prototype._saveEdge = function(id, out_vertex, in_vertex, shallow, waitForSync) {
Graph.prototype._saveEdge = function(id, out_vertex_id, in_vertex_id, shallow, waitForSync) {
this.emptyCachedPredecessors();
if (id !== undefined && id !== null) {
shallow._key = String(id);
}
var ref = this._edges.save(out_vertex._properties._id,
in_vertex._properties._id,
var ref = this._edges.save(out_vertex_id,
in_vertex_id,
shallow,
waitForSync);