Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-10-03 Thread BohwaZ/PHP
I believe that's how PDO::PARAM_LOB is intended to work (based on my reading of the docs and implementations for other drivers). It seems like more of a convenience than anything, though maybe someone had more ideas for how it should work across drivers and never got to follow through on it.

Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-10-03 Thread BohwaZ/PHP
Taking it to a better solution is that the method sqliteCreateFunction shouldn't exist on the PDO class, but instead on a PDOSqlite that extends PDO. class PDOSqlite extends PDO { public function createFunction(...) {...} } class PDO { public static function connect(string $dsn [, strin

Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-10-03 Thread Adam Baratz
> > PDO already has support for large objects (LOBs)[1]. I don't know if >>> and how these are supported by the pdo_sqlite driver, but wouldn't it >>> make sense to use the existing API instead of introducing a new >>> method? >>> >>> [1] >>> >>> >> Very

Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-10-03 Thread Dan Ackroyd
On 2 October 2017 at 22:48, BohwaZ/PHP wrote: > > If you follow your logic, then PDO::sqliteCreateFunction shouldn't exist, > and this would make the PDO sqlite driver pretty much useless as SQLite is > missing a number of important functions. That's taking it to the illogical conclusion. Takin

Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-10-02 Thread BohwaZ/PHP
On 02/10/17 01:48, BohwaZ/PHP wrote: So for me the use case is quite different here, and openBlob allows stuff that PDO::PARAM_LOB with bindColumn and bindParam cannot allow currently. In conclusion openBlob is still useful as it allows accessing a BLOB outside of a statement and allows to read

Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-10-02 Thread Lester Caine
On 02/10/17 01:48, BohwaZ/PHP wrote: > So for me the use case is quite different here, and openBlob allows > stuff that PDO::PARAM_LOB with bindColumn and bindParam cannot allow > currently. In conclusion openBlob is still useful as it allows accessing > a BLOB outside of a statement and allows to

Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-10-01 Thread BohwaZ/PHP
PDO already has support for large objects (LOBs)[1]. I don't know if and how these are supported by the pdo_sqlite driver, but wouldn't it make sense to use the existing API instead of introducing a new method? [1] Very interesting indeed, didn't kn

[PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-09-30 Thread BohwaZ
On Wed, 27 Sep 2017 11:41:50 +0200 / "Christoph M. Becker" said : > On 26.09.2017 at 04:03, BohwaZ/PHP wrote: > > > following my patch and discussions on this list, here is the RFC > > requested by some people here to implement "openBlob" in the > > pdo_sqlite driver, to match the "openBlob" met

[PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO

2017-09-27 Thread Christoph M. Becker
On 26.09.2017 at 04:03, BohwaZ/PHP wrote: > following my patch and discussions on this list, here is the RFC > requested by some people here to implement "openBlob" in the pdo_sqlite > driver, to match the "openBlob" method from the SQLite3 extension. > > https://wiki.php.net/rfc/implement_sqlite