Merge all pod generation into one inc snippet, cleanup the poddir beforehand
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Manual / ResultClass.pod
CommitLineData
3d4c5a84 1
2=head1 NAME
3
4DBIx::Class::Manual::ResultClass - Representing a single result (row) from
5a DB query
6
7=head1 SYNOPSIS
8
9 package My::Schema::Result::Track;
10
11 use parent 'DBIx::Class::Core';
12
13 __PACKAGE__->table('tracks');
14
15 __PACKAGE__->add_columns({
16 id => {
17 data_type => 'int',
18 is_auto_increment => 1,
19 },
20 cd_id => {
21 data_type => 'int',
22 },
23 title => {
24 data_type => 'varchar',
25 size => 50,
26 },
27 rank => {
28 data_type => 'int',
29 is_nullable => 1,
30 },
31 });
32
33 __PACKAGE__->set_primary_key('id');
34 __PACKAGE__->add_unique_constraint(u_title => ['cd_id', 'title']);
35
36=head1 DESCRIPTION
37
38In L<DBIx::Class>, a user normally receives query results as instances of a
39certain C<Result Class>, depending on the main query source. Besides being
40the primary "toolset" for interaction with your data, a C<Result Class> also
41serves to establish source metadata, which is then used during initialization
42of your L<DBIx::Class::Schema> instance.
43
44Because of these multiple seemingly conflicting purposes, it is hard to
45aggregate the documentation of various methods available on a typical
46C<Result Class>. This document serves as a general overview of C<Result Class>
47declaration best practices, and offers an index of the available methods
48(and the Components/Roles which provide them).
49
50=head1 AUTHOR AND CONTRIBUTORS
51
52See L<AUTHOR|DBIx::Class/AUTHOR> and L<CONTRIBUTORS|DBIx::Class/CONTRIBUTORS> in DBIx::Class
53
54=head1 LICENSE
55
56You may distribute this code under the same terms as Perl itself.