add() public method

Adds a relation in a link-list|set.
public add ( array $updates, string $class, boolean $append = true ) : Add
$updates array
$class string
$append boolean
return Add
 public function testAddLink()
 {
     $query = new Query();
     $binding = $this->createHttpBinding();
     $postRid = $this->post_id . ':0';
     $commentRid = $this->comment_id . ':1';
     $records = $binding->command('SELECT FROM ' . $postRid)->getResult();
     $before = count($records[0]->comments);
     $query->add(array('comments' => $commentRid), 'post')->where('@rid = ?', $postRid);
     $this->assertHttpStatus(200, $this->doQuery($query, $binding));
     $records = $binding->command('SELECT FROM ' . $postRid)->getResult();
     $after = count($records[0]->comments);
     $this->assertSame($after, $before + 1);
 }