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