internals:pdo:brainstorming
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
internals:pdo:brainstorming [2009/11/03 10:22] – RFC Draft for unified binding eis_os | internals:pdo:brainstorming [2009/12/06 12:47] – Last results of async handling, add transaction support eis_os | ||
---|---|---|---|
Line 6: | Line 6: | ||
* [[rfc/ | * [[rfc/ | ||
* [[rfc/ | * [[rfc/ | ||
- | |||
===== Questions ===== | ===== Questions ===== | ||
* What have we learned about the PDO architecture in the past years (that needs fixing)? | * What have we learned about the PDO architecture in the past years (that needs fixing)? | ||
- | * How do we deal with features that only related to one (or few) drivers? | + | * How do we deal with features that only related to one (or few) drivers? |
+ | * How do we deal with different error handling? Like some RDBMS create throw errors during the prepare stage, others at the first execute. | ||
+ | * How do we deal with different behavior like transaction errors causing a rollback on some RDBMS but not on others. | ||
+ | * How to deal with missing functionality available inside the native extensions? Is the goal to eventually replace the native extensions? Is there any chance to share connections between PDO and the native extensions? | ||
+ | * How do we handle cross connection transactions? | ||
===== PDO Bugs / PDO2 Improvements ===== | ===== PDO Bugs / PDO2 Improvements ===== | ||
- | |||
==== PDO ==== | ==== PDO ==== | ||
=== Documentation === | === Documentation === | ||
Line 23: | Line 24: | ||
=== Parameter binding & explicit data type set === | === Parameter binding & explicit data type set === | ||
- | * bindValue() & bindParam() should enforce the type giving, currently it uses the current zval type for MySQL Bug #44639 / [[http:// | + | * bindValue() & bindParam() should enforce the type giving, currently it uses the current zval type for MySQL Bug [[bugid@44639]] / [[http:// |
* PARAM_INT with strings => it should try to convert to the type, otherwise throw an Exception or create an error. | * PARAM_INT with strings => it should try to convert to the type, otherwise throw an Exception or create an error. | ||
* PARAM_BOOLEAN with strings => Exception or Error. | * PARAM_BOOLEAN with strings => Exception or Error. | ||
Line 29: | Line 30: | ||
* execute() could use an automatic approach PARAM_AUTO, could be a BC break [[http:// | * execute() could use an automatic approach PARAM_AUTO, could be a BC break [[http:// | ||
* allows automatic convert to PARAM_INT if zval is integer / float | * allows automatic convert to PARAM_INT if zval is integer / float | ||
+ | * prepared statement emulation (placeholder rewriting) is fragile, [[bugid@35368|cannot deal well with strings that look like placeholders]] inside quoted strings like "WHERE foo = 'check ?'" | ||
+ | * [[bugid@48856|different behavior]] when reusing the same oracle style named placeholder multiple times | ||
=== fetchObject === | === fetchObject === | ||
Line 41: | Line 44: | ||
* META_TABLENAME | * META_TABLENAME | ||
* ... | * ... | ||
+ | |||
+ | === Asynchronous requests === | ||
+ | see [[http:// | ||
+ | |||
+ | < | ||
+ | see [[http:// | ||
+ | |||
+ | Most drivers allow some kind of async query except MySQL, | ||
+ | additional connections could be created to allow concurrent queries. | ||
+ | |||
+ | see [[http:// | ||
+ | |||
+ | === PDO Persistent Connections === | ||
+ | see [[http:// | ||
+ | see [[http:// | ||
+ | |||
+ | * Defaults to be portable as much as possible | ||
+ | * Allow to disable certain connection reset/ | ||
+ | |||
Line 52: | Line 74: | ||
see [[http:// | see [[http:// | ||
- | === Asynchronous requests | + | === Transaction |
- | see [[http:// | + | PDO transaction object |
+ | see [[http:// | ||
+ | |||
+ | Possible problems: | ||
+ | * error handling | ||
+ | * nested transaction (emulation) | ||
===== PDO Binding behaviour (5.3) ===== | ===== PDO Binding behaviour (5.3) ===== | ||
Line 97: | Line 124: | ||
For compatibility the execute() function could be changed to PDO_PARAM_AUTO for less BC breaks. | For compatibility the execute() function could be changed to PDO_PARAM_AUTO for less BC breaks. | ||
- |
internals/pdo/brainstorming.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1