/**
  * Add a LET expression
  *
  * @param String $var de variable name
  * @param mixed|string|AqlGen $expression
  * @return \AqlGen
  */
 public function let($var, $expression)
 {
     if ($expression instanceof AqlGen) {
         $this->bindParams($expression->getParams());
     }
     $this->inner[] = [self::TYPE_LET => new Let($var, $expression)];
     return $this;
 }
 public function testObjectFilter()
 {
     $filter = new AqlFilter();
     $filter->andFilter('u.active = true');
     $filter->andFilter('u.age > @minAge');
     $filter->andFilter('u.age < @maxAge');
     $filter->bindParams(['@minAge' => 20, '@maxAge' => 50]);
     $aql = AqlGen::query('u', 'users')->filter($filter);
     $string = $aql->get();
     $this->assertEquals("FOR u IN users\n\tFILTER u.active = true && u.age > @minAge && u.age < @maxAge\nRETURN u", $string);
     $params = $aql->getParams();
     $this->assertArrayHasKey('@minAge', $params);
     $this->assertEquals($params['@minAge'], 20);
     $this->assertArrayHasKey('@maxAge', $params);
     $this->assertEquals($params['@maxAge'], 50);
 }