Skip to content

Specifying FetchMode with options #185

@vikkio88

Description

@vikkio88

I tried to specify to fetch mode globally with 'options'

'options' => [
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
]

but basically that does not matter because it is set anyway on ->get() via

$result = call_user_func_array(array($this->pdoStatement, 'fetchAll'), $this->fetchParameters);

on https://github.com/usmanhalalit/pixie/blob/master/src/Pixie/QueryBuilder/QueryBuilderHandler.php#L178

And if you try to set it on the QueryBuilderHandler using the setFetchMode() method, you will lose it next time you are going to use a ->table(), as it is creating a new instance of QB.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions