rfc:implement_sqlite_openblob_in_pdo

This is an old revision of the document!


PHP RFC: Implement missing SQLite feature "openBlob" in PDO

Introduction

The “SQLite” driver of PDO is missing some features provided by the “SQLite3” extension, namely “openBlob” which allows to access a stored blob as a stream/file pointer.

Proposal

As discussed on internals the SQLite driver of PDO is missing some features that are present in the SQLite3 extension.

One of those features has already been proposed and merged: Add support for SQLite open flags.

A second one has been proposed and is awaiting merging: Implement sqlite_stmt_readonly in PDO

But we are still missing this feature: SQLite3::openBlob: opening blobs for reading and writing as streams.

This would be implemented following the current practice of adding a driver-specific method:

PDO::sqliteOpenBlob(string $table , string $column , int $rowid [, string $dbname = “main” [, int $flags = PDO::SQLITE_OPEN_READONLY ]] )

This would return a resource file pointer. This would match exactly the behaviour of SQLite3::openBlob.

This is following what already exists in PDO, examples:

Backward Incompatible Changes

None.

Proposed PHP Version(s)

Next PHP 7.x

RFC Impact

To SAPIs

None.

To Existing Extensions

None.

To Opcache

None.

New Constants

None.

php.ini Defaults

None.

Open Issues

None so far.

Unaffected PHP Functionality

Nothing else is affected.

Future Scope

Any proposal to review and change current style and behaviour of driver-specific methods in PDO. This is out of the scope of this proposal.

Proposed Voting Choices

This proposal requires a 50%+1 majority.

Implement sqliteOpenBlob in PDO?
Real name Yes No
adambaratz (adambaratz)  
ashnazg (ashnazg)  
bukka (bukka)  
danack (danack)  
daverandom (daverandom)  
galvao (galvao)  
kalle (kalle)  
kelunik (kelunik)  
mariano (mariano)  
mbeccati (mbeccati)  
ocramius (ocramius)  
peehaa (peehaa)  
salathe (salathe)  
yunosh (yunosh)  
Final result: 7 7
This poll has been closed.

Patches and Tests

Implementation

After the project is implemented, this section should contain

  1. the version(s) it was merged to
  2. a link to the git commit(s)
  3. a link to the PHP manual entry for the feature
  4. a link to the language specification section (if any)

References

Rejected Features

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