Update upstream source from tag 'upstream/0.082843'
Update to upstream version '0.082843'
with Debian dir 5447532b81988c58d846844aafd9b0f747c9a6f8
gregor herrmann
1 year, 11 months ago
110 | 110 | kkane: Kevin L. Kane <kevin.kane@gmail.com> |
111 | 111 | konobi: Scott McWhirter <konobi@cpan.org> |
112 | 112 | lejeunerenard: Sean Zellmer <sean@lejeunerenard.com> |
113 | leont: Leon Timmermans <fawaka@gmail.com> | |
113 | 114 | littlesavage: Alexey Illarionov <littlesavage@orionet.ru> |
114 | 115 | lukes: Luke Saunders <luke.saunders@gmail.com> |
115 | 116 | marcus: Marcus Ramberg <mramberg@cpan.org> |
0 | 0 | Revision history for DBIx::Class |
1 | ||
2 | 0.082843 2022-05-17 10:50 (UTC) | |
3 | * Fixes | |
4 | - Adjust tests to account for DBD::SQLite's column_info() no longer | |
5 | being case-preserving in recent versions | |
6 | - Fix t/storage/replicated.t relying on no-longer-available module | |
7 | - Adjust t/53lean_startup.t to work around spurious changes in | |
8 | Perl5 core (GH#143) | |
1 | 9 | |
2 | 10 | 0.082842 2020-06-16 20:10 (UTC) |
3 | 11 | * New Features |
0 | DBIx::Class is Copyright (c) 2005-2020 by mst, castaway, ribasushi, and others. | |
0 | DBIx::Class is Copyright (c) 2005-2022 by mst, castaway, ribasushi, and others. | |
1 | 1 | See AUTHORS and LICENSE included with this distribution. All rights reserved. |
2 | 2 | |
3 | 3 | This is free software; you can redistribute it and/or modify it under the |
61 | 61 | bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=DBIx-Class |
62 | 62 | license: http://dev.perl.org/licenses/ |
63 | 63 | repository: https://github.com/Perl5/DBIx-Class |
64 | version: 0.082842 | |
64 | version: 0.082843 | |
65 | 65 | x_authority: cpan:RIBASUSHI |
66 | 66 | x_contributors: |
67 | 67 | - 'abraxxa: Alexander Hartmaier <abraxxa@cpan.org>' |
166 | 166 | - 'kkane: Kevin L. Kane <kevin.kane@gmail.com>' |
167 | 167 | - 'konobi: Scott McWhirter <konobi@cpan.org>' |
168 | 168 | - 'lejeunerenard: Sean Zellmer <sean@lejeunerenard.com>' |
169 | - 'leont: Leon Timmermans <fawaka@gmail.com>' | |
169 | 170 | - 'littlesavage: Alexey Illarionov <littlesavage@orionet.ru>' |
170 | 171 | - 'lukes: Luke Saunders <luke.saunders@gmail.com>' |
171 | 172 | - 'marcus: Marcus Ramberg <mramberg@cpan.org>' |
0 | DBIx::Class is Copyright (c) 2005-2020 by mst, castaway, ribasushi, and others. | |
0 | DBIx::Class is Copyright (c) 2005-2022 by mst, castaway, ribasushi, and others. | |
1 | 1 | See AUTHORS and LICENSE included with this distribution. All rights reserved. |
2 | 2 | |
3 | 3 | NAME |
190 | 190 | questions and suggestions have been shown to catalyze monumental |
191 | 191 | improvements in consistency, accuracy and performance. |
192 | 192 | |
193 | List of the awesome contributors who made DBIC v0.082842 possible | |
193 | List of the awesome contributors who made DBIC v0.082843 possible | |
194 | 194 | |
195 | 195 | abraxxa: Alexander Hartmaier <abraxxa@cpan.org> |
196 | 196 | |
395 | 395 | konobi: Scott McWhirter <konobi@cpan.org> |
396 | 396 | |
397 | 397 | lejeunerenard: Sean Zellmer <sean@lejeunerenard.com> |
398 | ||
399 | leont: Leon Timmermans <fawaka@gmail.com> | |
398 | 400 | |
399 | 401 | littlesavage: Alexey Illarionov <littlesavage@orionet.ru> |
400 | 402 |
Binary diff not shown
2 | 2 | |
3 | 3 | use strict; |
4 | 4 | use warnings; |
5 | ||
6 | #use base qw/Class::Accessor/; | |
7 | 5 | |
8 | 6 | sub get { |
9 | 7 | my ($self, @cols) = @_; |
17 | 17 | |
18 | 18 | ... |
19 | 19 | |
20 | configure_requires 'DBIx::Class' => '0.082842'; | |
20 | configure_requires 'DBIx::Class' => '0.082843'; | |
21 | 21 | |
22 | 22 | require DBIx::Class::Optional::Dependencies; |
23 | 23 |
10 | 10 | # $VERSION declaration must stay up here, ahead of any other package |
11 | 11 | # declarations, as to not confuse various modules attempting to determine |
12 | 12 | # this ones version, whether that be s.c.o. or Module::Metadata, etc |
13 | $VERSION = '0.082842'; | |
13 | $VERSION = '0.082843'; | |
14 | 14 | |
15 | 15 | { |
16 | 16 | package |
208 | 208 | the seemingly most insignificant questions and suggestions have been shown |
209 | 209 | to catalyze monumental improvements in consistency, accuracy and performance. |
210 | 210 | |
211 | List of the awesome contributors who made DBIC v0.082842 possible | |
211 | List of the awesome contributors who made DBIC v0.082843 possible | |
212 | 212 | |
213 | 213 | =encoding utf8 |
214 | 214 | |
417 | 417 | B<konobi>: Scott McWhirter <konobi@cpan.org> |
418 | 418 | |
419 | 419 | B<lejeunerenard>: Sean Zellmer <sean@lejeunerenard.com> |
420 | ||
421 | B<leont>: Leon Timmermans <fawaka@gmail.com> | |
420 | 422 | |
421 | 423 | B<littlesavage>: Alexey Illarionov <littlesavage@orionet.ru> |
422 | 424 |
29 | 29 | # exclude our test suite, known "module require-rs" and eval frames |
30 | 30 | $caller[1] =~ /^ t [\/\\] /x |
31 | 31 | or |
32 | $caller[0] =~ /^ (?: base | parent | Class::C3::Componentised | Module::Inspector | Module::Runtime ) $/x | |
32 | $caller[0] =~ /^ (?: base | parent | Class::C3::Componentised | Module::Inspector | Module::Runtime ) $/x && $caller[3] !~ m/::BEGIN$/ | |
33 | 33 | or |
34 | 34 | $caller[3] eq '(eval)', |
35 | 35 | ) |
3 | 3 | use Test::More; |
4 | 4 | use Test::Exception; |
5 | 5 | use Test::Warn; |
6 | use Test::Deep; | |
6 | 7 | use lib qw(t/lib); |
7 | 8 | use DBICTest ':DiffSQL'; |
8 | 9 | |
386 | 387 | $schema->source("Artist")->column_info_from_storage(1); |
387 | 388 | $schema->source("Artist")->{_columns_info_loaded} = 0; |
388 | 389 | |
389 | is_deeply ( | |
390 | cmp_deeply ( | |
390 | 391 | $schema->source('Artist')->columns_info, |
391 | 392 | { |
392 | 393 | artistid => { |
409 | 410 | size => 100 |
410 | 411 | }, |
411 | 412 | rank => { |
412 | data_type => "integer", | |
413 | data_type => re(qr/^integer$/i), | |
413 | 414 | default_value => 13, |
414 | 415 | is_nullable => 0, |
415 | 416 | size => undef |
420 | 421 | |
421 | 422 | ok($schema->source("Artist")->{_columns_info_loaded} == 1, 'Columns info loaded flag set'); |
422 | 423 | |
423 | is_deeply ( | |
424 | cmp_deeply ( | |
424 | 425 | $schema->source('Artist')->columns_info([qw/artistid rank/]), |
425 | 426 | { |
426 | 427 | artistid => { |
430 | 431 | size => undef |
431 | 432 | }, |
432 | 433 | rank => { |
433 | data_type => "integer", | |
434 | data_type => re(qr/^integer$/i), | |
434 | 435 | default_value => 13, |
435 | 436 | is_nullable => 0, |
436 | 437 | size => undef |
1 | 1 | use warnings; |
2 | 2 | |
3 | 3 | use Test::More; |
4 | use Test::Deep; | |
4 | 5 | use lib qw(t/lib); |
5 | 6 | use DBICTest; |
6 | 7 | |
47 | 48 | ); |
48 | 49 | |
49 | 50 | { |
50 | is_deeply ( | |
51 | cmp_deeply ( | |
51 | 52 | get_storage_column_info ($schema->storage, 'artist', qw/size/), |
52 | 53 | { |
53 | 54 | 'artistid' => { |
59 | 60 | 'is_nullable' => 1, |
60 | 61 | }, |
61 | 62 | 'rank' => { |
62 | 'data_type' => 'integer', | |
63 | 'data_type' => re(qr/^integer$/i), | |
63 | 64 | 'is_nullable' => 0, |
64 | 65 | 'default_value' => '13', |
65 | 66 | }, |
20 | 20 | |
21 | 21 | ok(!defined $cd[0]->liner_notes, 'No prefetch for NULL LEFT join'); |
22 | 22 | |
23 | is($cd[1]->{_relationship_data}{liner_notes}->notes, 'Buy Whiskey!', 'Prefetch for present LEFT JOIN'); | |
23 | is($cd[1]->liner_notes->notes, 'Buy Whiskey!', 'Prefetch for present LEFT JOIN'); | |
24 | 24 | |
25 | 25 | is(ref $cd[1]->liner_notes, 'DBICTest::LinerNotes', 'Prefetch returns correct class'); |
26 | 26 | |
27 | is($cd[2]->{_inflated_column}{artist}->name, 'Caterwauler McCrae', 'Prefetch on parent object ok'); | |
27 | is($cd[2]->artist->name, 'Caterwauler McCrae', 'Prefetch on parent object ok'); | |
28 | 28 | }, 1, 'prefetch ran only 1 select statement'); |
29 | 29 | |
30 | 30 | # test for partial prefetch via columns attr |
31 | my $cd = $schema->resultset('CD')->find(1, | |
31 | my $cd; | |
32 | $schema->is_executed_querycount( sub { | |
33 | $cd = $schema->resultset('CD')->find(1, | |
32 | 34 | { |
33 | 35 | columns => [qw/title artist artist.name/], |
34 | 36 | join => { 'artist' => {} } |
35 | 37 | } |
36 | ); | |
37 | is( $cd->artist->name, 'Caterwauler McCrae', 'single related column prefetched'); | |
38 | ); | |
39 | is( $cd->artist->name, 'Caterwauler McCrae', 'single related column prefetched'); | |
40 | }, 1, 'manual prefetch ran only 1 select statement'); | |
38 | 41 | |
39 | 42 | # start test for nested prefetch SELECT count |
40 | 43 | my $tag; |
64 | 67 | $schema->is_executed_querycount( sub { |
65 | 68 | $cd = $schema->resultset('CD')->find(1, { prefetch => 'artist' }); |
66 | 69 | |
67 | is($cd->{_inflated_column}{artist}->name, 'Caterwauler McCrae', 'artist prefetched correctly on find'); | |
68 | }, 1, 'find with prefetch ran exactly 1 select statement (excluding column_info)'); | |
70 | is($cd->artist->name, 'Caterwauler McCrae', 'artist prefetched correctly on find'); | |
71 | }, 1, 'find with prefetch ran exactly 1 select statement'); | |
69 | 72 | |
70 | 73 | $schema->is_executed_querycount( sub { |
71 | 74 | $cd = $schema->resultset('CD')->find(1, { prefetch => { cd_to_producer => 'producer' }, order_by => 'producer.producerid' }); |
75 | 75 | package DBIx::Class::DBI::Replicated::TestReplication; |
76 | 76 | |
77 | 77 | use DBICTest; |
78 | use base qw/Class::Accessor::Fast/; | |
79 | ||
80 | __PACKAGE__->mk_accessors( qw/schema/ ); | |
78 | use base 'Class::Accessor::Grouped'; | |
79 | ||
80 | ||
81 | __PACKAGE__->mk_group_accessors( simple => 'schema' ); | |
81 | 82 | |
82 | 83 | ## Initialize the object |
83 | 84 | |
84 | 85 | sub new { |
85 | 86 | my ($class, $schema_method) = (shift, shift); |
86 | my $self = $class->SUPER::new(@_); | |
87 | my $self = bless( (shift || {}), $class ); | |
87 | 88 | |
88 | 89 | $self->schema( $self->init_schema($schema_method) ); |
89 | 90 | return $self; |
147 | 148 | use File::Copy; |
148 | 149 | use base 'DBIx::Class::DBI::Replicated::TestReplication'; |
149 | 150 | |
150 | __PACKAGE__->mk_accessors(qw/master_path slave_paths/); | |
151 | __PACKAGE__->mk_group_accessors( simple => qw( master_path slave_paths ) ); | |
151 | 152 | |
152 | 153 | ## Set the master path from DBICTest |
153 | 154 | |
154 | 155 | sub new { |
155 | my $class = shift @_; | |
156 | my $self = $class->SUPER::new(@_); | |
156 | my $self = shift->next::method(@_); | |
157 | 157 | |
158 | 158 | $self->master_path( DBICTest->_sqlite_dbfilename ); |
159 | 159 | $self->slave_paths([ |