Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Orientdb 使用SQL或javascript函数进行图形深度克隆_Orientdb - Fatal编程技术网

Orientdb 使用SQL或javascript函数进行图形深度克隆

Orientdb 使用SQL或javascript函数进行图形深度克隆,orientdb,Orientdb,有没有SQL方法可以实现OrientDB深度克隆 或者,是否有一种javascript服务器功能(在orientdb studio中)方法可以实现它?我尝试使用这个小图 我使用了这个服务器端javascript函数 var g=orient.getGraph(); var myedge=g.command("sql","select @class as myclass,out,in from e"); for(i=0;i<myedge.length;i++){ var myEd

有没有SQL方法可以实现OrientDB深度克隆


或者,是否有一种javascript服务器功能(在orientdb studio中)方法可以实现它?

我尝试使用这个小图

我使用了这个服务器端javascript函数

var g=orient.getGraph();
var myedge=g.command("sql","select @class as myclass,out,in from e");
for(i=0;i<myedge.length;i++){
    var myEdgeClass=myedge[i].getProperty("myclass");
    var VertexOutId= myedge[i].getProperty("out").getId();
    var VertexInId= myedge[i].getProperty("in").getId();

    var VertexOut=g.command("sql","select @class as myclass,@this.toJSON('fetchPlan:in_*:-2 out_*:-2') as json          from " + VertexOutId);                                       
    var query="insert into " + VertexOut[0].getProperty("myclass") + " content"+VertexOut[0].getProperty("json");
    var copyVertexOut=g.command("sql",query);
    g.commit();

    var VertexIn=g.command("sql","select @class as myclass,@this.toJSON('fetchPlan:in_*:-2 out_*:-2') as json           from " + VertexInId);                                       
    query="insert into " + VertexIn[0].getProperty("myclass") + " content"+VertexIn[0].getProperty("json");
    var copyVertexIn=g.command("sql",query);
    g.commit();

    query="create edge " + myEdgeClass + " from " + copyVertexOut.getId() + " to " + copyVertexIn.getId(); 
    g.command("sql",query);

}
var g=orient.getGraph();
var myedge=g.command(“sql”,“选择@class作为myclass,out,in from e”);

对于(i=0;i我尝试使用这个小图形

我使用了这个服务器端javascript函数

var g=orient.getGraph();
var myedge=g.command("sql","select @class as myclass,out,in from e");
for(i=0;i<myedge.length;i++){
    var myEdgeClass=myedge[i].getProperty("myclass");
    var VertexOutId= myedge[i].getProperty("out").getId();
    var VertexInId= myedge[i].getProperty("in").getId();

    var VertexOut=g.command("sql","select @class as myclass,@this.toJSON('fetchPlan:in_*:-2 out_*:-2') as json          from " + VertexOutId);                                       
    var query="insert into " + VertexOut[0].getProperty("myclass") + " content"+VertexOut[0].getProperty("json");
    var copyVertexOut=g.command("sql",query);
    g.commit();

    var VertexIn=g.command("sql","select @class as myclass,@this.toJSON('fetchPlan:in_*:-2 out_*:-2') as json           from " + VertexInId);                                       
    query="insert into " + VertexIn[0].getProperty("myclass") + " content"+VertexIn[0].getProperty("json");
    var copyVertexIn=g.command("sql",query);
    g.commit();

    query="create edge " + myEdgeClass + " from " + copyVertexOut.getId() + " to " + copyVertexIn.getId(); 
    g.command("sql",query);

}
var g=orient.getGraph();
var myedge=g.command(“sql”,“选择@class作为myclass,out,in from e”);

对于(i=0;我认为本机不可能实现。我认为SQL不可能实现,但服务器端javascript可以通过一些代码实现。先导出然后导入数据库怎么样?这不是我的用例,我想克隆树的一部分,用于与应用程序相关的任务。我认为本机不可能实现。我认为不可能hat with SQL是不可能的,但服务器端javascript可以通过一些代码来完成。先导出然后导入数据库怎么样?这不是我的用例,我想克隆部分树以用于与应用程序相关的任务。感谢Alessandro,这确实是一个很好的起点!即使我想知道是否有特定的Java函数感谢Alessandro,这确实是一个很好的起点!即使我想知道是否有来自javascript的特定Java函数调用。