[DBAL-2958] Replaced PDO constants with values

parent a451eef8
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
], ],
"require": { "require": {
"php": "^7.2", "php": "^7.2",
"ext-pdo": "*",
"doctrine/cache": "^1.0", "doctrine/cache": "^1.0",
"doctrine/event-manager": "^1.0" "doctrine/event-manager": "^1.0"
}, },
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
namespace Doctrine\DBAL; namespace Doctrine\DBAL;
use PDO;
/** /**
* Contains portable column case conversions. * Contains portable column case conversions.
*/ */
...@@ -14,14 +12,14 @@ final class ColumnCase ...@@ -14,14 +12,14 @@ final class ColumnCase
* *
* @see \PDO::CASE_UPPER * @see \PDO::CASE_UPPER
*/ */
public const UPPER = PDO::CASE_UPPER; public const UPPER = 1;
/** /**
* Convert column names to lower case. * Convert column names to lower case.
* *
* @see \PDO::CASE_LOWER * @see \PDO::CASE_LOWER
*/ */
public const LOWER = PDO::CASE_LOWER; public const LOWER = 2;
/** /**
* This class cannot be instantiated. * This class cannot be instantiated.
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
namespace Doctrine\DBAL; namespace Doctrine\DBAL;
use PDO;
/** /**
* Contains statement fetch modes. * Contains statement fetch modes.
*/ */
...@@ -17,7 +15,7 @@ final class FetchMode ...@@ -17,7 +15,7 @@ final class FetchMode
* *
* @see \PDO::FETCH_ASSOC * @see \PDO::FETCH_ASSOC
*/ */
public const ASSOCIATIVE = PDO::FETCH_ASSOC; public const ASSOCIATIVE = 2;
/** /**
* Specifies that the fetch method shall return each row as an array indexed * Specifies that the fetch method shall return each row as an array indexed
...@@ -26,7 +24,7 @@ final class FetchMode ...@@ -26,7 +24,7 @@ final class FetchMode
* *
* @see \PDO::FETCH_NUM * @see \PDO::FETCH_NUM
*/ */
public const NUMERIC = PDO::FETCH_NUM; public const NUMERIC = 3;
/** /**
* Specifies that the fetch method shall return each row as an array indexed * Specifies that the fetch method shall return each row as an array indexed
...@@ -35,7 +33,7 @@ final class FetchMode ...@@ -35,7 +33,7 @@ final class FetchMode
* *
* @see \PDO::FETCH_BOTH * @see \PDO::FETCH_BOTH
*/ */
public const MIXED = PDO::FETCH_BOTH; public const MIXED = 4;
/** /**
* Specifies that the fetch method shall return each row as an object with * Specifies that the fetch method shall return each row as an object with
...@@ -44,7 +42,7 @@ final class FetchMode ...@@ -44,7 +42,7 @@ final class FetchMode
* *
* @see \PDO::FETCH_OBJ * @see \PDO::FETCH_OBJ
*/ */
public const STANDARD_OBJECT = PDO::FETCH_OBJ; public const STANDARD_OBJECT = 5;
/** /**
* Specifies that the fetch method shall return only a single requested * Specifies that the fetch method shall return only a single requested
...@@ -52,7 +50,7 @@ final class FetchMode ...@@ -52,7 +50,7 @@ final class FetchMode
* *
* @see \PDO::FETCH_COLUMN * @see \PDO::FETCH_COLUMN
*/ */
public const COLUMN = PDO::FETCH_COLUMN; public const COLUMN = 7;
/** /**
* Specifies that the fetch method shall return a new instance of the * Specifies that the fetch method shall return a new instance of the
...@@ -60,7 +58,7 @@ final class FetchMode ...@@ -60,7 +58,7 @@ final class FetchMode
* *
* @see \PDO::FETCH_CLASS * @see \PDO::FETCH_CLASS
*/ */
public const CUSTOM_OBJECT = PDO::FETCH_CLASS; public const CUSTOM_OBJECT = 8;
/** /**
* This class cannot be instantiated. * This class cannot be instantiated.
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
namespace Doctrine\DBAL; namespace Doctrine\DBAL;
use PDO;
/** /**
* Contains statement parameter types. * Contains statement parameter types.
*/ */
...@@ -14,35 +12,35 @@ final class ParameterType ...@@ -14,35 +12,35 @@ final class ParameterType
* *
* @see \PDO::PARAM_NULL * @see \PDO::PARAM_NULL
*/ */
public const NULL = PDO::PARAM_NULL; public const NULL = 0;
/** /**
* Represents the SQL INTEGER data type. * Represents the SQL INTEGER data type.
* *
* @see \PDO::PARAM_INT * @see \PDO::PARAM_INT
*/ */
public const INTEGER = PDO::PARAM_INT; public const INTEGER = 1;
/** /**
* Represents the SQL CHAR, VARCHAR, or other string data type. * Represents the SQL CHAR, VARCHAR, or other string data type.
* *
* @see \PDO::PARAM_STR * @see \PDO::PARAM_STR
*/ */
public const STRING = PDO::PARAM_STR; public const STRING = 2;
/** /**
* Represents the SQL large object data type. * Represents the SQL large object data type.
* *
* @see \PDO::PARAM_LOB * @see \PDO::PARAM_LOB
*/ */
public const LARGE_OBJECT = PDO::PARAM_LOB; public const LARGE_OBJECT = 3;
/** /**
* Represents a boolean data type. * Represents a boolean data type.
* *
* @see \PDO::PARAM_BOOL * @see \PDO::PARAM_BOOL
*/ */
public const BOOLEAN = PDO::PARAM_BOOL; public const BOOLEAN = 5;
/** /**
* Represents a binary string data type. * Represents a binary string data type.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment