1DBIx::Class::Helper::RoUws:e:rSeClofnRtersiubluttSeDedBtI(Px3e:)r:lClDaoscsu:m:eHnetlapteiro:n:Row::SelfResultSet(3)
2
3
4
6 DBIx::Class::Helper::Row::SelfResultSet - Easily use ResultSet methods
7 for the current row
8
10 In result class:
11
12 __PACKAGE__->load_components('Helper::Row::SelfResultSet');
13
14 Elsewhere:
15
16 $row->self_rs->$some_rs_method->single
17
19 Sometimes you need to be able to access a ResultSet containing just the
20 current row. A good reason to do that would be if you had a ResultSet
21 method that adds in some calculated data, like counts of a
22 relationship. You could use this to get at that counted data without
23 duplicating the logic for the counting.
24
25 Due to primitives provided by DBIx::Class::PK this references the
26 current values, or in "DBIx::Class" terms, the dirty values. So if you
27 modify the primary columns it will be temporarily incorrect. For what
28 it's worth I'm not married to this behavior and I'd rather you get in
29 touch with me before you depend on it.
30
32 self_rs
33 $row->self_rs
34
35 returns a ResultSet containing just the current row.
36
38 Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
39
41 This software is copyright (c) 2019 by Arthur Axel "fREW" Schmidt.
42
43 This is free software; you can redistribute it and/or modify it under
44 the same terms as the Perl 5 programming language system itself.
45
46
47
48perl v5.30.1 202D0B-I0x1:-:2C9lass::Helper::Row::SelfResultSet(3)