methods
- Reimplement Traversable interface
# If there is a problem with this i need a backtrace. As far as i can
# tell by gdb/valgrind/logic there is no error here. But missuse leads to
# the same error report casing the exclusion of interface Traversable.
NULLs into empty strings as well as the other way around. It still doesn't
help a great deal in the long run, but at least the option is there.
Make sure hash tables are nulled out to avoid double freeing them.
proto bool PDOStatement::closeCursor()
Closes the cursor, leaving the statement ready for re-execution.
The purpose of the function is to free up the connection to the server so that
other queries may be issued, but leaving the statement in a state that it can
be re-executed.
This is implemented either as an optional driver specific method (allowing for
maximum efficiency), or as the generic PDO fallback if no driver specific
function is installed.
The PDO generic fallback is semantically the same as writing the following code
in your PHP script:
do {
while ($stmt->fetch())
;
if (!$stmt->nextRowset())
break;
} while (true);
floating point values into strings during fetch. This is a compatibility hack
for drivers that return native types rather than string representations.
We use this flag in the test suite to persuade postgres tests to pass.
by name, even when multiple columns have the same name:
$sql = "SELECT 1 a, 2 a, 3 b, 4 c, 5 d, 6 c, 7 a";
echo "$sql\n";
print_r($db->query($sql)->fetchAll(PDO_FETCH_NAMED));
Array
(
[0] => Array
(
[a] => Array
(
[0] => 1
[1] => 2
[2] => 7
)
[b] => 3
[c] => Array
(
[0] => 4
[1] => 6
)
[d] => 5
)
)
Also added two new attributes for use at prepare time;
PDO_ATTR_FETCH_TABLE_NAMES and PDO_ATTR_FETCH_CATALOG_NAMES instruct the driver
that the names of the columns that they return to PDO should include the table
and catalog names respectively. Both attributes may be used together or
independently. The catalog, table and column name components should be
separated by a . character.
- Fix handling of read only property 'queryString'
- Fix overloading
- Move class init code to their defining .c files for simplification
- Mark class PDORow as final until there's a need to inherit this and
someone implements the handlers correct then.
The only allowed places to throw them directly are from within the PDO class
constructors or when dealing with transaction level attributes, where
"hard-failure" is a feature.
All other errors should use the PDO error handling mechanism and respect the
users selected error mode.
- Verify fetch modes
- Add last fetch mode PDO_FETCH_FUNC (only valid inside fetchAll()) that
allows to completley customize the way data is treated on the fly