Commit Graph

72 Commits

Author SHA1 Message Date
Wez Furlong
17683295e4 switch to package2.xml 2005-12-04 22:34:26 +00:00
Wez Furlong
b15e33f85a prep for release 2005-11-28 06:39:53 +00:00
Wez Furlong
ab6a675131 going to release 1.0.1 2005-11-26 21:22:49 +00:00
Wez Furlong
85ad81736c set to 1.0 stable. 2005-11-26 20:50:08 +00:00
foobar
366832fbd2 MFH: Fixed wrong usage of ZEND_EXTENSION_API_NO (these are not Zend exts :) 2005-11-25 16:01:41 +00:00
Antony Dovgal
b33c2d9b17 nuke unused variable 2005-10-05 22:17:38 +00:00
Derick Rethans
3abc925a8a - Committing some changes that make PDO+SPL not crash anymore. These are done
by Marcus. and I'm committing them in order to actually use PHP 5.1 without
segfaulting when apache starts. This is not necessary the best solution.
2005-10-05 13:51:46 +00:00
Marcus Boerger
991a29cfd6 - MFH PDOException base 2005-10-02 20:38:18 +00:00
Ilia Alshanetsky
bfe844e41e MFH: Make PDO use class constants 2005-09-20 00:35:21 +00:00
Antony Dovgal
9a1c6c55b8 fix build (declare extern HashTable pdo_driver_hash) 2005-09-18 18:05:59 +00:00
Wez Furlong
7e762989e7 move pdo_drivers -> PDO::getAvailableDrivers as part of namespacing sweep. 2005-09-18 14:13:08 +00:00
Wez Furlong
9e9f413aeb Fix PECL Bug #5010 2005-09-11 19:44:26 +00:00
Wez Furlong
77d3a41f8a update package.xml files and version numbers, in anticipation of a big bunch of releases. 2005-09-11 05:27:30 +00:00
Wez Furlong
1e37cc7b82 set version numbers to 1.0 2005-09-11 05:06:30 +00:00
Wez Furlong
e9c81e4983 actually register PDO_PARAM_BOOL as a constant (doh!).
When emulating bound parameters, pass booleans via the driver's quoter
method, so that is has an opportunity to tweak it.
Refs #33876: PDO misquotes/miscasts bool(false)
2005-09-10 20:58:19 +00:00
Wez Furlong
163c92510a Prep for PECL release 2005-07-27 02:39:46 +00:00
Ilia Alshanetsky
97e8c6f4a9 Proper handling for databases that need to pre-calculate length of large
columns, which is not normally done for performance reasons.
2005-07-20 03:38:33 +00:00
Wez Furlong
664ebfa499 expand oracle null handling compatability by offering the ability to convert
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.
2005-07-12 02:40:59 +00:00
Wez Furlong
49c1882837 Add a PDO_ATTR_STRINGIFY_FETCHES attribute, which is used to convert integer or
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.
2005-07-08 04:13:00 +00:00
Wez Furlong
da7d537d49 populate the new dbh->driver field.
Implement PDO_ATTR_DRIVER_NAME.
2005-07-07 17:08:01 +00:00
Wez Furlong
d4a158260b Add PDO_FETCH_NAMED; closes PECL #4641 by providing a way to access columns
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.
2005-07-03 03:49:44 +00:00
Marcus Boerger
5cf2c9dc45 - Add +ifdefs to still allow PHP 5.0 builds of PDO
# PDO is a PECL extension and at the moment is still meant to compile on
# both PHP 5.0 and PHP 5.1.
2005-06-23 00:19:16 +00:00
Dmitry Stogov
f47c78487b Improved PHP extension loading mechanism with support for module dependencies and conflicts 2005-06-17 09:39:23 +00:00
Wez Furlong
fcff6a079a "Fix" PECL #4411
SPL is not initialized before PDO, so inheriting from SPL's runtime exception class gives PDO a broken exception class.
We don't currently have a way to express this kind of "soft" dependency in the build system, so I'm disabling inheriting from the runtime exception for now.
2005-06-10 06:11:29 +00:00
Antony Dovgal
e499a1c296 fix segfault & buffer overrun when there is no PDO drivers plugged in
(patch by su1d@phpclub.net)
2005-03-29 17:23:36 +00:00
Marcus Boerger
dce82da87d - Add function pdo_drivers() 2005-03-22 10:36:25 +00:00
Marcus Boerger
73a6a31053 - the driver's key name is not zero terminated, hence we need to either
estrNcpy() it or use the driver struct.
- table headers do not support single column mode so change to two cols
- there should be only one table header
2005-03-22 10:26:51 +00:00
Marcus Boerger
c9108bba25 - Simplify code (only implement handlers that are necessary)
- 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.
2005-03-21 00:29:06 +00:00
Wez Furlong
5248f59d1a show list of PDO drivers in phpinfo.
Highlight a possible problem area; iterator leaks when used in foreach(),
at least with sqlite2 driver.
2005-03-12 01:16:59 +00:00
Wez Furlong
de1d8b91f0 prep package file for release.
fix my favourite typo.
fix compile warnings
2005-03-09 05:03:58 +00:00
Marcus Boerger
fdc3fce335 - Fix missapplied logic inversion 2005-02-28 01:08:07 +00:00
Marcus Boerger
fef7cb4e29 - Disable direct serializing for PHP 5.0 2005-02-27 22:58:08 +00:00
Marcus Boerger
03a4a8c11d - Add some fetch column related capailities
- Add direct (classtype based) unserializing capabilities
2005-02-27 22:32:11 +00:00
Wez Furlong
2c5b2fc105 Alan: moved your fields away, but reserved you a pointer.
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.
2005-02-26 17:27:51 +00:00
Marcus Boerger
effe989d91 - Show that PDOStatement implements Traversable 2005-02-23 00:52:14 +00:00
Marcus Boerger
cb9658feef - Revert signature of PDO:prepare()
old: proto object PDO::prepare(string statment [, array driver_options [, string classname ]])
  now: proto object PDO::prepare(string statment [, array options])
  param 'classname' and and 'ctor_args' are now set through options
  using index PDO_ATTR_STATEMENT_CLASS
- Change all deriver_options parameters to 'options' to reflect the fact
  that they may contain statement as well as driver specific flags
2005-02-22 20:25:56 +00:00
Marcus Boerger
3c743e3a98 - Allow to derive PDOStatement
- 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
2005-02-22 19:27:34 +00:00
Marcus Boerger
d56ce00b85 - Add fetch flag PDO_FETCH_CLASSTYPE 2005-02-20 16:12:57 +00:00
Marcus Boerger
b788dc9d2a - Add fetch mode PDO_FETCH_UNIQUE 2005-02-19 23:48:30 +00:00
Marcus Boerger
474fcab623 - Add PDO_FETCH_GROUP to fetchAll() 2005-02-19 23:11:23 +00:00
Wez Furlong
9653864fbd prep for release 2005-02-18 15:32:14 +00:00
Marcus Boerger
ef2b59f772 - Expand tests to have it work inside PHP 5.0 2005-02-13 18:13:44 +00:00
Marcus Boerger
746d5490cf - Use runtimeException as base if present (synch with other dbs) 2005-02-13 15:40:15 +00:00
Wez Furlong
0be93c95c9 prep for release 2005-02-13 06:56:16 +00:00
Wez Furlong
1f06eb1c5c update in anticipation of a release later tonight 2005-02-11 01:22:44 +00:00
Wez Furlong
69cbb7f958 prep for release 2005-02-10 01:56:20 +00:00
Wez Furlong
94d5261f73 cosmetic changes 2005-02-09 15:12:41 +00:00
Wez Furlong
5a2cb4154a update ready for release
# includes big hack to help guide people into running "make install" so
# that the headers get installed; works around a pear bug.
2005-02-09 04:54:56 +00:00
Wez Furlong
36e3ea8cb2 add input/output parameter type flag 2005-02-07 01:12:49 +00:00
Wez Furlong
81664bd2db Remove bogus scroll attribute.
Expose cursor constants to the script
2005-01-12 05:59:27 +00:00