Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags/v0.08270 il version 03 #135

Open
wants to merge 4 commits into
base: maint/0.0828xx
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/DBIx/Class/Storage/DBI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1871,13 +1871,13 @@ sub _bind_sth_params {
my ($self, $sth, $bind, $bind_attrs) = @_;

for my $i (0 .. $#$bind) {

if( my $func = $self->can('_bind_sth_params_specificities') ){
if( my $ado_type = $func->($self, $bind->[$i][0]{sqlt_datatype}) ){
$bind_attrs->[$i]{ado_type} = $ado_type;
}
}

if (ref $bind->[$i][1] eq 'SCALAR') { # any scalarrefs are assumed to be bind_inouts
$sth->bind_param_inout(
$i + 1, # bind params counts are 1-based
Expand Down
12 changes: 6 additions & 6 deletions lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,15 @@ sub _mssql_max_data_type_representation_size_in_units {
}

=head2 _bind_sth_params_specificities

Quick hack to manage sql server specificities for a part of numerics values with float
so use :

so use :
my $Enums = DBD::ADO::Const->Enums;
$Enums->{DataTypeEnum}{adSingle} or $Enums->{DataTypeEnum}{adVarWChar}

FixMe with a function like this e.g to manage with the good parameters definition (look like as https://metacpan.org/source/SGOELDNER/DBD-ADO-2.99/lib/DBD/ADO/TypeInfo.pm) :

sub datatype_to_ado {
my ($self, $sqlt_datatype) = @_;
# https://www.w3schools.com/asp/ado_datatypes.asp
Expand Down Expand Up @@ -480,7 +480,7 @@ sub _mssql_max_data_type_representation_size_in_units {
}
return $ado_type;
}

=cut

sub _bind_sth_params_specificities {
Expand Down