src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 104-106 (lines=3) @@
|
| 101 |
|
$driverOptions = []; |
| 102 |
|
|
| 103 |
|
// use custom data fetch mode |
| 104 |
|
if (!empty($options['fetch_mode'])) { |
| 105 |
|
$driverOptions[PDO::ATTR_DEFAULT_FETCH_MODE] = constant('\PDO::FETCH_' . strtoupper($options['fetch_mode'])); |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
// support arbitrary \PDO::MYSQL_ATTR_* driver options and pass them to PDO |
| 109 |
|
// http://php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants |
src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 61-63 (lines=3) @@
|
| 58 |
|
$driverOptions = []; |
| 59 |
|
|
| 60 |
|
// use custom data fetch mode |
| 61 |
|
if (!empty($options['fetch_mode'])) { |
| 62 |
|
$driverOptions[PDO::ATTR_DEFAULT_FETCH_MODE] = constant('\PDO::FETCH_' . strtoupper($options['fetch_mode'])); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
$db = $this->createPdoConnection($dsn, $options['user'], $options['pass'], $driverOptions); |
| 66 |
|
|
src/Phinx/Db/Adapter/SQLiteAdapter.php 1 location
|
@@ 148-150 (lines=3) @@
|
| 145 |
|
$driverOptions = []; |
| 146 |
|
|
| 147 |
|
// use custom data fetch mode |
| 148 |
|
if (!empty($options['fetch_mode'])) { |
| 149 |
|
$driverOptions[PDO::ATTR_DEFAULT_FETCH_MODE] = constant('\PDO::FETCH_' . strtoupper($options['fetch_mode'])); |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
$db = $this->createPdoConnection($dsn, null, null, $driverOptions); |
| 153 |
|
|
src/Phinx/Db/Adapter/SqlServerAdapter.php 1 location
|
@@ 71-73 (lines=3) @@
|
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
// use custom data fetch mode |
| 71 |
|
if (!empty($options['fetch_mode'])) { |
| 72 |
|
$driverOptions[PDO::ATTR_DEFAULT_FETCH_MODE] = constant('\PDO::FETCH_' . strtoupper($options['fetch_mode'])); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
// support arbitrary \PDO::SQLSRV_ATTR_* driver options and pass them to PDO |
| 76 |
|
// http://php.net/manual/en/ref.pdo-sqlsrv.php#pdo-sqlsrv.constants |