rfc:implement_sqlite_openblob_in_pdo

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
rfc:implement_sqlite_openblob_in_pdo [2017/09/26 01:52] – under discussion bohwazrfc:implement_sqlite_openblob_in_pdo [2020/08/01 23:50] (current) – Status is "Declined" carusogabriel
Line 4: Line 4:
   * Date: 2017-09-19   * Date: 2017-09-19
   * Author: bohwaz   * Author: bohwaz
-  * Status: Under Discussion+  * Status: Declined
   * First Published at: http://wiki.php.net/rfc/implement_sqlite_openblob_in_pdo   * First Published at: http://wiki.php.net/rfc/implement_sqlite_openblob_in_pdo
  
Line 31: Line 31:
   * Creating a LOB (Large Object) in PostgreSQL: [[https://secure.php.net/manual/en/pdo.pgsqllobcreate.php|PDO::pgsqlLOBCreate]]   * Creating a LOB (Large Object) in PostgreSQL: [[https://secure.php.net/manual/en/pdo.pgsqllobcreate.php|PDO::pgsqlLOBCreate]]
   * Creating a function in SQLite: [[https://secure.php.net/manual/en/pdo.sqlitecreatefunction.php|PDO::sqliteCreateFunction]]   * Creating a function in SQLite: [[https://secure.php.net/manual/en/pdo.sqlitecreatefunction.php|PDO::sqliteCreateFunction]]
 +
 +These driver-specific methods are only defined when instantiating PDO with the right driver, trying to call them with another driver results in an error due to calling an undefined method.
 +
 +=== Why not just use PDO LOBs support via PDO::bindColumn and PDO::bindParam? ===
 +
 +For reference: [[http://www.php.net/manual/en/pdo.lobs.php]]
 +
 +As this was discussed on internals, the PDO LOB support is for accessing LOB using SQL queries, //openBlob// is for accessing LOBs directly. This is a very fast and efficient way of using SQLite as a blob store, which can't be done if going through SQL queries as traditional PDO::PARAM_LOB support is doing. Furthermore, //openBlob// allows to both read and write in a blob at the same time. And finally the current code handling LOBs in PDO via bindParam and bindColumn is broken, it is returning a string (with MySQL and SQLite, but not PostgreSQL) instead of a resource file pointer. I will try to spend time fixing that in the coming months.
 +
 +In conclusion this new method and the existing PDO LOB support provide different features for different needs, and both are useful.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
Line 38: Line 48:
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
  
-Next PHP 7.x+PHP 7.3
  
 ===== RFC Impact ===== ===== RFC Impact =====
Line 75: Line 85:
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
  
-This proposal requires a 50%+1 majority.+This proposal requires a 50%+1 majority. Vote closing on Oct 27, 2017.
  
 <doodle title="Implement sqliteOpenBlob in PDO?" voteType="single" closed="true"> <doodle title="Implement sqliteOpenBlob in PDO?" voteType="single" closed="true">
Line 96: Line 106:
 ===== References ===== ===== References =====
  
 +  * [[https://externals.io/message/100773|Internals RFC discussion]]
   * [[https://externals.io/message/100268|Internals original discussion]]   * [[https://externals.io/message/100268|Internals original discussion]]
  
 ===== Rejected Features ===== ===== Rejected Features =====
 Keep this updated with features that were discussed on the mail lists. Keep this updated with features that were discussed on the mail lists.
rfc/implement_sqlite_openblob_in_pdo.1506390771.txt.gz · Last modified: 2017/09/26 01:52 by bohwaz