Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
rfc:implement_sqlite_openblob_in_pdo [2017/10/08 21:27] – bohwaz | rfc:implement_sqlite_openblob_in_pdo [2017/10/08 21:29] – bohwaz |
---|
* 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? == | === 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. |
This proposal requires a 50%+1 majority. | This proposal requires a 50%+1 majority. |
| |
<doodle title="Implement sqliteOpenBlob in PDO?" voteType="single" closed="true"> | <doodle title="Implement sqliteOpenBlob in PDO?" voteType="single" closed="false"> |
* Yes | * Yes |
* No | * No |
===== 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. |