line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package # hide from PAUSE |
2
|
|
|
|
|
|
|
DBIx::Class::Storage::DBI::ADO::CursorUtils; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
497
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
5
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
48
|
|
6
|
2
|
|
|
2
|
|
9
|
use base 'Exporter'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
700
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our @EXPORT_OK = qw/_normalize_guids _strip_trailing_binary_nulls/; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _strip_trailing_binary_nulls { |
11
|
0
|
|
|
0
|
|
|
my ($select, $col_infos, $data, $storage) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
foreach my $select_idx (0..$#$select) { |
14
|
|
|
|
|
|
|
|
15
|
0
|
0
|
|
|
|
|
next unless defined $data->[$select_idx]; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $data_type = $col_infos->{$select->[$select_idx]}{data_type} |
18
|
0
|
0
|
|
|
|
|
or next; |
19
|
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
$data->[$select_idx] =~ s/\0+\z// |
21
|
|
|
|
|
|
|
if $storage->_is_binary_type($data_type); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _normalize_guids { |
26
|
0
|
|
|
0
|
|
|
my ($select, $col_infos, $data, $storage) = @_; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
foreach my $select_idx (0..$#$select) { |
29
|
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
next unless defined $data->[$select_idx]; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $data_type = $col_infos->{$select->[$select_idx]}{data_type} |
33
|
0
|
0
|
|
|
|
|
or next; |
34
|
|
|
|
|
|
|
|
35
|
0
|
0
|
|
|
|
|
$data->[$select_idx] =~ s/\A \{ (.+) \} \z/$1/xs |
36
|
|
|
|
|
|
|
if $storage->_is_guid_type($data_type); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# vim:sts=2 sw=2: |