[Dbix-class] DBIx::Class::Storage::DBI::NoBindVars failing on
custom data types
Peter Rabbitson
rabbit+dbic at rabbit.us
Thu Jun 18 18:51:49 GMT 2009
Robert Heinzmann wrote:
> Hello,
>
> we use DBIx::Class on Sybase and have custom types (based on Numeric) on
> Sybase.
>
> The Standard DBIx::Class::Storage::DBI::Sybase uses
> DBIx::Class::Storage::DBI::NoBindVars because auf the "poor quote
> support" for DBI.
>
> However when trying to issue numeric queries, an integer value is quoted
> to '1234' and this fails on the server.
>
> I tried to define the data type manually:
>
> __PACKAGE__->add_columns(
> 'host_id' => { data_type => "integer" },
> );
>
> However this setting is ignored -> values still quoted with "'".
>
> 099_07 seems to address this issue, however it is not ready yet. I also
> tested this release by replacing
> /usr/share/perl5/DBIx/Class/Storage/DBI/NoBindVars.pm and
> /usr/share/perl5/DBIx/Class/Storage/DBI/Sybase.pm of Debian Lenny Stable
> with the once from 99_07 - issue not fixed. I also updated to testing
> release of libdbix-class-perl - no success.
>
> I changed /usr/share/perl5/DBIx/Class/Storage/DBI/Sybase.pm to:
>
> use base qw/DBIx::Class::Storage::DBI/;
>
> And now the query seems to work.
>
> Is the "poor quote support in prepare" of DBD::Sybase still true ?
>
> ii libdbix-class-perl 0.08103-1
> extensible and flexible object <-> relationa
> ii libdbd-sybase-perl 1.00-3+b2
> Sybase/MS SQL database driver for the DBI mo
> ii libct4 0.82-4
> libraries for connecting to MS SQL and Sybas
> ii freetds-common 0.82-4
> configuration files for FreeTDS SQL client l
>
> cat /etc/debian_version
> 5.0.1
>
Try this branch:
http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/branches/sybase/
It is not released yet, but will be very soon if we get input from
users like yourself.
More information about the DBIx-Class
mailing list