public MoveVertexStep(OIdentifier targetClass, OCluster targetCluster, OCommandContext ctx, boolean profilingEnabled) { super(ctx, profilingEnabled); this.targetClass = targetClass == null ? null : targetClass.getStringValue(); if (targetCluster != null) { this.targetCluster = targetCluster.getClusterName(); if (this.targetCluster == null) { this.targetCluster = ctx.getDatabase().getClusterNameById(targetCluster.getClusterNumber()); } } }
if (this.clusters != null) { for (OCluster c : this.clusters) { if (c.getClusterName() != null) { targetClusterNames.add(c.getClusterName()); } else { String clusterName = db.getClusterNameById(c.getClusterNumber());
Integer clusterId = cluster.getClusterNumber(); if (clusterId == null) { clusterId = db.getClusterIdByName(cluster.getClusterName()); Integer clusterId = cluster.getClusterNumber(); if (clusterId == null) { clusterId = db.getClusterIdByName(cluster.getClusterName());
List<OCluster> clustersForShard = new ArrayList<>(); for (OCluster cluster : allClusters) { String name = cluster.getClusterName(); if (name == null) { name = ctx.getDatabase().getClusterNameById(cluster.getClusterNumber());
String name = cluster.getClusterName(); Integer clusterId = cluster.getClusterNumber(); if (name == null) { Integer clusterId = cluster.getClusterNumber(); if (clusterId == null) { clusterId = db.getClusterIdByName(cluster.getClusterName()); Integer clusterId = cluster.getClusterNumber(); if (clusterId == null) { clusterId = db.getClusterIdByName(cluster.getClusterName());
if (clusterName != null) { clusterId = db.getClusterIdByName(clusterName); } else if (cluster.getClusterName() != null) { clusterId = db.getClusterIdByName(cluster.getClusterName()); } else { clusterId = cluster.getClusterNumber();
String name = item.getCluster().getClusterName(); if (name == null) { name = db.getClusterNameById(item.getCluster().getClusterNumber()); String name = cluster.getClusterName(); if (name == null) { name = db.getClusterNameById(cluster.getClusterNumber());
public OInsertExecutionPlan createExecutionPlan(OCommandContext ctx, boolean enableProfiling) { OInsertExecutionPlan result = new OInsertExecutionPlan(ctx); if (targetIndex != null) { result.chain(new InsertIntoIndexStep(targetIndex, insertBody, ctx, enableProfiling)); } else { if (selectStatement != null) { handleInsertSelect(result, this.selectStatement, ctx, enableProfiling); } else { handleCreateRecord(result, this.insertBody, ctx, enableProfiling); } handleTargetClass(result, targetClass, ctx, enableProfiling); handleSetFields(result, insertBody, ctx, enableProfiling); if (targetCluster != null) { String name = targetCluster.getClusterName(); if (name == null) { name = ctx.getDatabase().getClusterNameById(targetCluster.getClusterNumber()); } handleSave(result, new OIdentifier(name), ctx, enableProfiling); } else { handleSave(result, targetClusterName, ctx, enableProfiling); } handleReturn(result, returnStatement, ctx, enableProfiling); } return result; }