Hi, Jeff,

> 1. The new SQL::Statement will allow manipulation of blobs, but only
> with placeholders:
> 
>   This only works in the XS version of SQL::Statement:
> 
>            $dbh->do("INSERT INTO foo VALUES( $blob )");
> 
>   But this works in both versions:
> 
>         $dbh->do("INSERT INTO foo VALUES( ? )",undef,$blob);

what's the actual difference? And what does "blob" precisely
mean in terms of SQL::Statement?


> Personally, I am in favor of keeping the new behaviour and requiring
> that blobs be handled with placeholders.  Is that a good 
> decision?  How
> do other drivers handle this?

If I could see a true reason for a requirement, I would
tend to agree. However, so far I don't see a reason.
What other drivers do, depends on the underlying database.
For example, DBD::mysql will luckily support both versions,
but other databases will force placeholders.


> 2. The new SQL::Statement will not allow empty strings to be 
> treated as
> NULLs, thus:
> 
>   These worked in XS bersion but don't in the new version:
> 
>         $dbh->do("INSERT INTO foo VALUES( '' )");
>         $dbh->prepare("SELECT * FROM foo WHERE frump = '' ");
> 
>   But these work in both versions:
> 
>         $dbh->do("INSERT INTO foo VALUES( NULL )");
>         $dbh->prepare("SELECT * FROM foo WHERE frump IS NULL );

In the case of DBD::CSV, I see a good reason to drop the
distinction between NULL and ''. In other cases this would
be different, of course. Again, you should specify more
details.



> Jochen, if I go with the new behaviour, would you be willing to accept
> patches for blobs.t, chopblanks.t and ak-dbd.t that would 
> either use the
> new syntax or would throw warnings rather than exceptions so that
> DBD::CSV will install without failing tests when the users 
> have the new
> Statement installed?

DBD::CSV should run with SQL::Statement out of the box.
So I will happily accept patches. It would be nice,
though, if you could make the decision for "pass" or
not based on the backing version of SQL::Statement.
Even more, I'd be happy, if you could offer to take
maintenance of DBD::CSV to your hands.


Yours,

Jochen

Reply via email to