Syntax change for bind options

15 views
Skip to first unread message

Dami Laurent (PJ)

unread,
Apr 18, 2013, 9:22:48 AM4/18/13
to dbix-da...@googlegroups.com
Hi all,
 
Recently I added some support for specifying bind types (on request from Sergiy Zuban).
The initial syntax was as follows :
 
   -where => { column => [ $orig_value, \%bind_type] }
 
This has the advantage of being very close to the DBI syntax
 
   $sth->bind_param($num, $orig_value, \%bind_type) 
 
Then RIBASUSHI informed me that DBIx ::Class has a a similar feature, but with a different syntax. So to be compatible, I implemented that as well :
 
   -where => { column => [ {dbd_attrs => \%bind_type}, $orig_value] }
 
Now I realize that the first syntax has some problems, especially with requests like
 
   -where => {column => [ undef, {‘>’ => $min} ]}
 
So I think that I should drop the first syntax and only support the second, which is easier to identify. This means that if some of you invested on the first syntax since SQL ::Abstract ::More v1.11 (07.04.2013), you will have to change your code before you upgrade to the next release.
 
Sorry about this regression … but better now when it’s still fresh,  than too late.
 
Cheers, Laurent Dami
 
 

Sergiy Zuban

unread,
Apr 19, 2013, 2:37:40 PM4/19/13
to dbix-da...@googlegroups.com
Laurent,

Thank you informing about the change. Just tested new version - everything works fine.

-- 
Sergiy Zuban
Reply all
Reply to author
Forward
0 new messages