Skip to content

Commit

Permalink
Rename ComparedTo to QuantifiedComparison to match ANSI SQL nomenclature
Browse files Browse the repository at this point in the history
Signed-off-by: pine3ree <[email protected]>
  • Loading branch information
pine3ree committed Oct 18, 2023
1 parent 3c30440 commit 676ec5a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Sql/Predicate/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
namespace pine3ree\Db\Sql\Predicate;

use pine3ree\Db\Sql;
use pine3ree\Db\Sql\Predicate\CompareTo;
use pine3ree\Db\Sql\Predicate\QuantifiedComparison;

/**
* This class represents a sql operator-ALL(SELECT...) condition
*/
class All extends CompareTo
class All extends QuantifiedComparison
{
protected static string $quantifier = Sql::ALL;
}
4 changes: 2 additions & 2 deletions src/Sql/Predicate/Any.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
namespace pine3ree\Db\Sql\Predicate;

use pine3ree\Db\Sql;
use pine3ree\Db\Sql\Predicate\CompareTo;
use pine3ree\Db\Sql\Predicate\QuantifiedComparison;

/**
* This class represents a sql operator-ANY(SELECT...) condition
*/
class Any extends CompareTo
class Any extends QuantifiedComparison
{
protected static string $quantifier = Sql::ANY;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @property-read Select $select The sql select statement this predicate refers to
*/
abstract class CompareTo extends Predicate
abstract class QuantifiedComparison extends Predicate
{
/** @var string|Alias|Identifier|Literal */
protected $identifier;
Expand Down
4 changes: 2 additions & 2 deletions src/Sql/Predicate/Some.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
namespace pine3ree\Db\Sql\Predicate;

use pine3ree\Db\Sql;
use pine3ree\Db\Sql\Predicate\CompareTo;
use pine3ree\Db\Sql\Predicate\QuantifiedComparison;

/**
* This class represents a sql operator-SOME(SELECT...) condition
*/
class Some extends CompareTo
class Some extends QuantifiedComparison
{
protected static string $quantifier = Sql::SOME;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
use PHPUnit\Framework\TestCase;
use pine3ree\Db\Exception\InvalidArgumentException;
use pine3ree\Db\Sql;
use pine3ree\Db\Sql\Predicate\CompareTo;
use pine3ree\Db\Sql\Predicate\QuantifiedComparison;
use pine3ree\Db\Sql\Statement\Select;

class CompareToTest extends TestCase
class QuantifiedComparisonTest extends TestCase
{
public function setUp(): void
{
Expand All @@ -26,9 +26,9 @@ public function tearDown(): void
{
}

private function createInstance($identifier, string $operator, Select $select): CompareTo
private function createInstance($identifier, string $operator, Select $select): QuantifiedComparison
{
return new class ($identifier, $operator, $select) extends CompareTo {
return new class ($identifier, $operator, $select) extends QuantifiedComparison {
public static string $quantifier = 'FEW';
};
}
Expand Down

0 comments on commit 676ec5a

Please sign in to comment.