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/10/08 21:27] 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 32: Line 32:
   * 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]]
  
-== Why not just use [[http://www.php.net/manual/en/pdo.lobs.php|PDO LOBs]] support via PDO::bindColumn and PDO::bindParam? ==+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. 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.
Line 81: 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 102: 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.1507498053.txt.gz · Last modified: 2017/10/08 21:27 by bohwaz