diff --git a/DataStorage/Database/BuilderAbstract.php b/DataStorage/Database/BuilderAbstract.php index 300227dd4..8b0346692 100644 --- a/DataStorage/Database/BuilderAbstract.php +++ b/DataStorage/Database/BuilderAbstract.php @@ -49,7 +49,7 @@ abstract class BuilderAbstract * @var int * @since 1.0.0 */ - protected $type = QueryType::EMPTY; + protected $type = QueryType::NONE; /** * Prefix. diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index a9d787cc8..aa6fe6436 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -444,7 +444,7 @@ class DataMapperAbstract implements DataMapperInterface } // if a table only has a single column = primary key column. This must be done otherwise the query is empty - if ($query->getType() === QueryType::EMPTY) { + if ($query->getType() === QueryType::NONE) { $query->insert(static::$primaryField)->value(0, static::$columns[static::$primaryField]['type']); } diff --git a/DataStorage/Database/Query/QueryType.php b/DataStorage/Database/Query/QueryType.php index ff3a77dfd..3d1727cb5 100644 --- a/DataStorage/Database/Query/QueryType.php +++ b/DataStorage/Database/Query/QueryType.php @@ -32,5 +32,5 @@ abstract class QueryType extends Enum public const DELETE = 3; public const RANDOM = 4; public const RAW = 5; - public const EMPTY = 6; + public const NONE = 6; } diff --git a/tests/DataStorage/Database/Query/QueryTypeTest.php b/tests/DataStorage/Database/Query/QueryTypeTest.php index a9c8c8469..5d67acef2 100644 --- a/tests/DataStorage/Database/Query/QueryTypeTest.php +++ b/tests/DataStorage/Database/Query/QueryTypeTest.php @@ -28,6 +28,6 @@ class QueryTypeTest extends \PHPUnit\Framework\TestCase self::assertEquals(3, QueryType::DELETE); self::assertEquals(4, QueryType::RANDOM); self::assertEquals(5, QueryType::RAW); - self::assertEquals(6, QueryType::EMPTY); + self::assertEquals(6, QueryType::NONE); } }