@@ -32,7 +32,7 @@ class PDOStatement extends PDOStatementAlias
3232 * @param StatementInterface $statement
3333 * @param array|null $options
3434 */
35- public function __construct (private readonly StatementInterface $ statement , private readonly ?array $ options = [])
35+ public function __construct (private readonly StatementInterface $ statement , private ?array $ options = [])
3636 {
3737 }
3838
@@ -145,21 +145,30 @@ public function getColumnMeta(int $column): array|false
145145 }
146146
147147 $ flags = array_filter ([
148- 'not_null ' => $ col ['flags ' ] & 1 ,
148+ 'not_null ' => $ col ['flags ' ] & 1 ,
149149 'primary_key ' => $ col ['flags ' ] & 2 ,
150150 ]);
151151
152152 return [
153- 'name ' => $ col ['name ' ],
154- 'table ' => $ col ['table ' ] ?? '' ,
155- 'len ' => $ col ['columnLength ' ] ?? 0 ,
156- 'precision ' => $ col ['decimals ' ] ?? 0 ,
153+ 'name ' => $ col ['name ' ],
154+ 'table ' => $ col ['table ' ] ?? '' ,
155+ 'len ' => $ col ['columnLength ' ] ?? 0 ,
156+ 'precision ' => $ col ['decimals ' ] ?? 0 ,
157157 'native_type ' => $ col ['type ' ]->name ,
158- 'flags ' => array_keys ($ flags ),
159- 'pdo_type ' => match ($ col ['type ' ]->name ) {
158+ 'flags ' => array_keys ($ flags ),
159+ 'pdo_type ' => match ($ col ['type ' ]->name ) {
160160 'LONGLONG ' => PDO ::PARAM_INT ,
161- default => PDO ::PARAM_STR ,
161+ default => PDO ::PARAM_STR ,
162162 },
163163 ];
164164 }
165+
166+ /**
167+ * @inheritDoc..$args
168+ * @return void
169+ */
170+ public function setFetchMode ($ mode , ...$ args ): void
171+ {
172+ $ this ->options [PDO ::ATTR_DEFAULT_FETCH_MODE ] = $ mode ;
173+ }
165174}
0 commit comments