rfc:pdov1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
rfc:pdov1 [2008/04/28 18:18] lsmithrfc:pdov1 [2014/04/08 22:50] – Inactive levim
Line 3: Line 3:
   * Date: 2008-03-06   * Date: 2008-03-06
   * Author: Lukas Smith <smith@pooteeweet.org>   * Author: Lukas Smith <smith@pooteeweet.org>
-  * Status: Under Discussion+  * Status: Draft (Inactive)
  
 This RFC aims to collect a set of ideas to improve PDO version 1. These ideas will hopefully end up in a set of concret feature requests and patches. This RFC aims to collect a set of ideas to improve PDO version 1. These ideas will hopefully end up in a set of concret feature requests and patches.
Line 18: Line 18:
  
 A lot in PDO can be fixed without a new major version. A lot in PDO can be fixed without a new major version.
- 
 ===== Proposal and Patch ===== ===== Proposal and Patch =====
  
-  * Fix differences in behavior for data fetches (possibly add a compatibility mode in order to maintain BC) +  * Convenience features 
-  * Add a common syntax to specify the DSN along the lines of the PEAR DSN format +    * Add a common syntax to specify the DSN along the lines of the PEAR DSN format 
-  * Add some better debugging hooks (like a way to get the last submitted statement, this is important especially when PDO does some rewriting like with prepared statements) +    * Add ability to generate a properly quoted comma separated list to be embedded in a query inside an IN() clause (see [[http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Datatype_Common.html#methodimplodeArray|implodeArray()]]) 
-  * Fix differences in when bind/prepare issues an exception for an invalid bound value/parameter. +  * Higher level emulation features 
-  * Add ability to bind short binary values +    Fix differences in behavior for data fetches (possibly add a compatibility mode in order to maintain BC
-  * Add ability to generate a properly quoted comma separated list to be embedded in a query inside an IN() clause (see [[http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Datatype_Common.html#methodimplodeArray|implodeArray()]]) +    * Add ability to manage connection session aspects like charset/collation, locale (datetime/currency format) 
-  * Better documentation and testing +    * Add limited sub select emulation (see [[http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Common.html#methodsubSelect|subSelect()]]) 
-  Add support for CLOB fields in Oracle (and other databases) and generally work harder on making the LOB behavior more similar across the drivers (see [[http://pecl.php.net/bugs/bug.php?id=7943|Bug 7943]]+    * A class for administrative functionality which can come in handy for projects like phpMyAdmin. (possibly partially in userland) 
-  * Add ability to manage connection session aspects like charset/collation, locale (datetime/currency format) +    * Nested transaction emulation via SAVEPOINTs 
-  * Add limited sub select emulation (see [[http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Common.html#methodsubSelect|subSelect()]]) +    * Emulate scrollable cursors via buffered result sets 
-  * Improve the prepared statement emulation parser to better deal with quoted strings that contain things that look like a placeholder+  * Prepared statements 
 +    * Fix differences in when bind/prepare issues an exception for an invalid bound value/parameter. 
 +    * Add ability to bind short binary values 
 +    * Improve the prepared statement emulation parser to better deal with quoted strings that contain things that look like a placeholder 
 +    * Make it possible to disable parsing and rewriting of placeholders and require the use of the given native syntax (:name, $name, ? etc.) 
 +    * Fix the problems with ODBC prepared statements when executing procedures on all platforms. 
 +    * Add support for PDO::PARAM_CLOB and generally work harder on making the LOB behavior more similar across the drivers (see [[http://pecl.php.net/bugs/bug.php?id=7943|Bug 7943]]) 
 +    * Add support for datatypes like float and datetime/timestamp 
 +    * Do not force the use of prepared statements internally for simple queries without any parameters 
 +    * Optionally only use native prepared statement for SQL injection protection, but leverage the ability of some RDBMS to pass the [http://pooteeweet.org/blog/1233 statement and the values in a single call] 
 +  * Improve documentation
   * Add support of multiple resultsets for mssql and odbc on all platforms.   * Add support of multiple resultsets for mssql and odbc on all platforms.
-  * Fix the problems with ODBC prepared statements when executing procedures on all platforms. 
-  * Add support for datatypes like float and datetime/timestamp 
   * Add ability to retrieve the parameters set in the constructor (like DSN etc.)   * Add ability to retrieve the parameters set in the constructor (like DSN etc.)
-  * Throw an exception if a fetch method is call on a statement that has not been executed at least once+  * Add ability to determine the state of the connection/transactions (as well as the ability to reconnect) 
 +  * Make sure PDO classes implement interfaces so that frameworks can use it as a generic data access interface and implement native driver versions of it if needed (esp. PDOStatement). 
 +  * OCI8 has some persistent connection tuning parameters like timeout, max_connections, ... Make that generic and consistent in PDO. 
 +  * Improved Quoting 
 +    * Consider having an attribute that sets quoting style + maybe even allow for a callback for quoting. 
 +    * Making quoting function aware of encoding in PDO (add quoting for identifier & value) 
 +  * Improved error handling and debugging 
 +    * Add some better debugging hooks (like a [[bugid@44319|way to get the last submitted statement]], this is important especially when PDO does some rewriting like with prepared statements) 
 +    * For consistency it would be good to clear errors on every call and provide facility to expose multiple notices/errors that have occurred within a transaction 
 +    * Throw an exception if a fetch method is call on a statement that has not been executed at least once 
 +    * Expand support for SQLSTATE error codes to ensure that all drivers return more or less compatible error codes 
 +  * Full blown Metadata APIs ala JDBC (important for higher-level DB layers). (possibly partially in userland) 
 +  * Test suite which DB driver authors can use for compliance testing.
  
 ==== Rejected Features ==== ==== Rejected Features ====
Line 44: Line 63:
 ==== More about PDO ==== ==== More about PDO ====
  
-  * http://php.net/pdo+  * http://php.net/pdo (userland manual) 
 +  * http://php.net/internals2.pdo (internals manual) 
 +  * http://wiki.php.net/rfc/pdonotices (rfc about database notices which can be handled by PDO)
  
 ==== References ==== ==== References ====
rfc/pdov1.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1