4 DBIx::Class::Manual::ResultClass - Representing a single result (row) from
9 package My::Schema::Result::Track;
11 use parent 'DBIx::Class::Core';
13 __PACKAGE__->table('tracks');
15 __PACKAGE__->add_columns({
18 is_auto_increment => 1,
24 data_type => 'varchar',
33 __PACKAGE__->set_primary_key('id');
34 __PACKAGE__->add_unique_constraint(u_title => ['cd_id', 'title']);
38 In L<DBIx::Class>, a user normally receives query results as instances of a
39 certain C<Result Class>, depending on the main query source. Besides being
40 the primary "toolset" for interaction with your data, a C<Result Class> also
41 serves to establish source metadata, which is then used during initialization
42 of your L<DBIx::Class::Schema> instance.
44 Because of these multiple seemingly conflicting purposes, it is hard to
45 aggregate the documentation of various methods available on a typical
46 C<Result Class>. This document serves as a general overview of C<Result Class>
47 declaration best practices, and offers an index of the available methods
48 (and the Components/Roles which provide them).
50 =head1 AUTHOR AND CONTRIBUTORS
52 See L<AUTHOR|DBIx::Class/AUTHOR> and L<CONTRIBUTORS|DBIx::Class/CONTRIBUTORS> in DBIx::Class
56 You may distribute this code under the same terms as Perl itself.