public function testAddRelationshipWithPartialData() { $queryEngine = new QueryEngine(); $user_id = 20; $from = ['sid' => 753, 'tableName' => 'Sheet1', 'columns' => ['cid(616) + cid(617)']]; $to = ['sid' => 752, 'tableName' => 'Sheet1', 'columns' => ['cid(609)']]; $confidence = 0; $queryEngine->AddRelationship($user_id, $name, $description, $from, $to, $confidence, $comment); }
function AddRelationship() { global $current_user; $name = $_POST["name"]; $description = $_POST["description"]; $from = $_POST["from"]; $to = $_POST["to"]; $confidence = $_POST["confidence"]; $comment = $_POST["comment"]; $queryEngine = new QueryEngine(); echo json_encode($queryEngine->AddRelationship($current_user->user_id, $name, $description, $from, $to, $confidence, $comment)); }