Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] Re: [PDO] Re: [PHP-DEV] [PATCH] New PDO methods for PostgreSQL driver [RSS Feed]

#1 June 12, 2010 13:10:14

Alexey Z.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: [PDO] Re: [PHP-DEV] [PATCH] New PDO methods for PostgreSQL driver


On 12.06.2010, at 15:54, Ilia Alshanetsky wrote:

> The concerns you raised about custom methods specific to database drivers
> were not reflective of the PDO's intent as was clarified by Wez and myself.
>
> The code that was introduced was specific to PostgreSQL, the common
> functionality was introduced in a way that allows each driver to implement.

I agree with Ilia on this.
Piece of functionality which is "common" was implemented in generic way. Piece
of functionality which is not "common" was implemented as postgresql-specific
extension.
That's exactly how it should be and the fact of updates to PDO is awesome on
it's own.


> On Sat, Jun 12, 2010 at 12:24 PM, Pierre Joye <pierre.***@*mail.com> wrote:
>
>> hi Ilia,
>>
>> So you basically say that the worries and wishes raised here are
>> simply irrelevant and at the end of the day you decide what PDO can or
>> cannot be?
>>
>> I'm very disappointed by these two commits. I don't think it is the
>> way we should develop PDO and it is clear that I'm not the only one to
>> think that. As it is trunk, I won't battle too much to revert it but
>> be sure that is not something I will let in for any of the upcoming
>> releases as it is clearly bad design.
>>
>> Cheers,
>> --
>> Pierre


--
Alexey Zakhlestinhttp://www.milkfarmsoft.com/smime.p7sDescription:S/MIME cryptographic signature

Attachments:
attachment smime.p7s (2.6 KB)

Offline

#2 June 13, 2010 23:53:15

Jared W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: [PDO] Re: [PHP-DEV] [PATCH] New PDO methods for PostgreSQL driver


> -----Original Message-----
> From: Stanley Sufficool
> Sent: 13 June 2010 20:10
> To: Ilia Alshanetsky
> Cc: Pierre Joye; Denis Gasparin; Matteo Beccati;
> intern***@*ists.php.net; pdo
> Subject: Re: Re: Re: New
> PDO methods for PostgreSQL driver
>
> On Sat, Jun 12, 2010 at 4:54 AM, Ilia Alshanetsky
> <i***@*rohost.org> wrote:
> > The concerns you raised about custom methods specific to database
> > drivers were not reflective of the PDO's intent as was
> clarified by Wez and myself.
> >
> > The code that was introduced was specific to PostgreSQL, the
common
> > functionality was introduced in a way that allows each
> driver to implement.
>
>
> Yet the rest of the copyFrom, copyTo, etc.. could have ben
> generic as well. I specifically stated that this could be
> done at the driver level for FreeTDS using the BCP extensions
> and/or using "BULK INSERT ". Yet now this is a specific
> pgsql*** interface that cannot be abstracted for other
> drivers OR implemented at the driver level. Now if I want a
> MSSQL / Sybase dump/load method, I need to preface it with
> dblibCopyFrom, dblibCopyTo.
>
> IMHO, every function should be a generic named interface to
> the driver or statement level and then throw a "not
> implemented" if the driver does not support it. This will
> allow for abstraction at a higher level and give the driver
> developers an opportunity to implement it. It will also give
> PDO users a more structured way to deal with unsupported
> methods with try/catch.
>
> I know I am a noob to the PDO development process, however I
> have used OO for quite awhile and I have never seen it DB
> abstractions implemented like this.


But a complete nonsense for a PDO driver maintainer.
If adds one function to a driver, then you have to had add an function
to all the rest.

A generic copyFrom or copyTo method should only be added when there is
enough PDO drivers that behave in exactly the same manner, and to do
that, you needed specific implementations to test and compare with.

If the dblib methods can't behave the same as the postgres methods,
then clearly they shouldn't be named the same.

Jared



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

  • Root
  • » PHP
  • » [PHP-DEV] Re: [PDO] Re: [PHP-DEV] [PATCH] New PDO methods for PostgreSQL driver [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support