| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* pull-request/341: (23 commits)
typofixes
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
# Based on patch by CoreyStup at gmail dot com
|
| |
| |
| |
| | |
structure change
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
# Based on patch by CoreyStup at gmail dot com
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pecl#12794, pecl#12401
# Running the tests:
# (Note: Doesn't work currnetly on HEAD, see:
# http://news.php.net/php.qa/64378)
#
# PDO_MYSQL_TEST_DSN - DSN
# For example: mysql:dbname=test;host=localhost;port=3306
#
# PDO_MYSQL_TEST_HOST - database host
# PDO_MYSQL_TEST_DB - database (schema) name
# PDO_MYSQL_TEST_SOCKET - database server socket
# PDO_MYSQL_TEST_ENGINE - storage engine to use
# PDO_MYSQL_TEST_USER - database user
# PDO_MYSQL_TEST_PASS - database user password
# PDO_MYSQL_TEST_CHARSET - database charset
#
# NOTE: if any of PDO_MYSQL_TEST_[HOST|DB|SOCKET|ENGINE|CHARSET] is
# part of PDO_MYSQL_TEST_DSN, the values must match. That is, for example,
# for PDO_MYSQL_TEST_DSN = mysql:dbname=test you MUST set PDO_MYSQL_TEST_DB=test.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
into an associated array.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
. Fix iterator based access
. Add new attribute ATTR_DEFAULT_FETCH_MODE: $bdh->setAttribute()
. Add new fetch mode: FETCH_PROPS_LATE, this fills object member
variables after calling the constructor (fixes #36428).
|
|
|
|
|
|
| |
attributes employed by mysql and postgres drivers.
No functional change.
|
|
|
|
|
|
| |
Partially back out that fix and introduce an extra optional step for drivers to
canonicalize the "name" that is used for registering parameters.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
improve infrastructure for LOB support.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
columns, which is not normally done for performance reasons.
|
|
|
|
|
|
|
|
| |
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);
|
| |
|
|
|
|
|
|
|
|
|
| |
These are effectively named statements with strong constraints on the naming
format. We cater for this in a fairly generic way: allow a driver to replace
the format string we use to generate names from positional parameters. In
addition, if that format is set, we always force a rewrite from regular names
to the strongly enforced names.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
new one each time.
Add a hook for persistent connections: it is called when the object goes out of
scope, and offers the driver an opportunity to release per-request scoped data
at the right time.
This hook is used by pdo_sqlite to unregister UDFs, which are dangerous to keep
registered between requests.
|
| |
|
| |
|
|
|
|
|
| |
- Add direct (classtype based) unserializing capabilities
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changed PDO::lastInsertId() to have following proto:
string PDO::lastInsertId([string name])
this allows arbitrary unique identitifers to be returned from the driver.
The optional name parameter is for databases that require additional contextual
information to be able to return the correct identifier. None currently use
it, but pgsql will be on the list of drivers that do.
|