Make pod generation more palatable to the existing toolchain
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Manual / ResultClass.pod.proto
1 #
2 # This is what eventually becomes lib/DBIx/Class/Manual/ResultClass.pod
3 # Courtesy of maint/gen_pod_inherit and Pod::Inherit
4 #
5
6 =head1 NAME
7
8 DBIx::Class::Manual::ResultClass - Representing a single result (row) from
9 a DB query
10
11 =head1 SYNOPSIS
12
13   package My::Schema::Result::Track;
14
15   use parent 'DBIx::Class::Core';
16
17   __PACKAGE__->table('tracks');
18
19   __PACKAGE__->add_columns({
20     id => {
21       data_type => 'int',
22       is_auto_increment => 1,
23     },
24     cd_id => {
25       data_type => 'int',
26     },
27     title => {
28       data_type => 'varchar',
29       size => 50,
30     },
31     rank => {
32       data_type => 'int',
33       is_nullable => 1,
34     },
35   });
36
37   __PACKAGE__->set_primary_key('id');
38   __PACKAGE__->add_unique_constraint(u_title => ['cd_id', 'title']);
39
40 =head1 DESCRIPTION
41
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.
47
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).
53
54 =head1 AUTHOR AND CONTRIBUTORS
55
56 See L<AUTHOR|DBIx::Class/AUTHOR> and L<CONTRIBUTORS|DBIx::Class/CONTRIBUTORS> in DBIx::Class
57
58 =head1 LICENSE
59
60 You may distribute this code under the same terms as Perl itself.