Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add files via upload
  • Loading branch information
ABRAHAM Morgan authored Aug 28, 2016
commit 109e34bdd9b9ab780f553ff4afdd0922fb08e6a5
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Add.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Add extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_ADD, $value, $other);
parent::__construct(TermTermType::PB_ADD, [$value, $other]);
}
}
7 changes: 4 additions & 3 deletions rdb/Queries/Math/BinaryOp.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

class BinaryOp extends ValuedQuery
{
public function __construct($termType, $value, $other)
public function __construct($termType, array $exprs)
{
$this->termType = $termType;

$this->setPositionalArg(0, $this->nativeToDatum($value));
$this->setPositionalArg(1, $this->nativeToDatum($other));
foreach ($exprs as $k => $expr) {
$this->setPositionalArg($k, $this->nativeToDatum($expr));
}
}

protected function getTermType()
Expand Down
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Div.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Div extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_DIV, $value, $other);
parent::__construct(TermTermType::PB_DIV, [$value, $other]);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Eq.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Eq extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_EQ, $value, $other);
parent::__construct(TermTermType::PB_EQ, [$value, $other]);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Ge.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Ge extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_GE, $value, $other);
parent::__construct(TermTermType::PB_GE, [$value, $other]);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Gt.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Gt extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_GT, $value, $other);
parent::__construct(TermTermType::PB_GT, [$value, $other]);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Le.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Le extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_LE, $value, $other);
parent::__construct(TermTermType::PB_LE, [$value, $other]);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Lt.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Lt extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_LT, $value, $other);
parent::__construct(TermTermType::PB_LT, [$value, $other]);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Mod extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_MOD, $value, $other);
parent::__construct(TermTermType::PB_MOD, [$value, $other]);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Mul.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Mul extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_MUL, $value, $other);
parent::__construct(TermTermType::PB_MUL, [$value, $other]);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Ne.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Ne extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_NE, $value, $other);
parent::__construct(TermTermType::PB_NE, [$value, $other]);
}
}
4 changes: 2 additions & 2 deletions rdb/Queries/Math/RAnd.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

class RAnd extends BinaryOp
{
public function __construct($value, $other)
public function __construct(array $exprs)
{
parent::__construct(TermTermType::PB_AND, $value, $other);
parent::__construct(TermTermType::PB_AND, $exprs);
}
}
4 changes: 2 additions & 2 deletions rdb/Queries/Math/ROr.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

class ROr extends BinaryOp
{
public function __construct($value, $other)
public function __construct(array $exprs)
{
parent::__construct(TermTermType::PB_OR, $value, $other);
parent::__construct(TermTermType::PB_OR, $exprs);
}
}
2 changes: 1 addition & 1 deletion rdb/Queries/Math/Sub.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Sub extends BinaryOp
{
public function __construct($value, $other)
{
parent::__construct(TermTermType::PB_SUB, $value, $other);
parent::__construct(TermTermType::PB_SUB, [$value, $other]);
}
}