34b8661d8a2f2a57c818cfcffc19e4ea2a5f5ab3
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class.pm
1 package DBIx::Class;
2
3 use strict;
4 use warnings;
5
6 use vars qw($VERSION);
7 use base qw/DBIx::Class::Componentised Class::Data::Accessor/;
8
9 sub mk_classdata { shift->mk_classaccessor(@_); }
10 sub component_base_class { 'DBIx::Class' }
11
12 $VERSION = '0.04999_02';
13
14 1;
15
16 =head1 NAME 
17
18 DBIx::Class - Extensible and flexible object <-> relational mapper.
19
20 =head1 SYNOPSIS
21
22 =head1 DESCRIPTION
23
24 This is an SQL to OO mapper, inspired by the L<Class::DBI> framework, 
25 and meant to support compability with it, while restructuring the 
26 internals and making it possible to support some new features like 
27 self-joins, distinct, group bys and more.
28
29 This project is still at an early stage, so the maintainers don't make
30 any absolute promise that full backwards-compatibility will be supported;
31 however, if we can without compromising the improvements we're trying to
32 make, we will, and any non-compatible changes will merit a full justification
33 on the mailing list and a CPAN developer release for people to test against.
34
35 The community can be found via -
36
37   Mailing list: http://lists.rawmode.org/mailman/listinfo/dbix-class/
38
39   SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
40
41   Wiki: http://dbix-class.shadowcatsystems.co.uk/
42
43   IRC: irc.perl.org#dbix-class
44
45 =head1 QUICKSTART
46
47 If you're using L<Class::DBI>, and want an easy and fast way of migrating to
48 DBIx::Class, take a look at L<DBIx::Class::CDBICompat>.
49
50 There are two ways of using DBIx::Class, the "simple" way and the "schema" way.
51 The "simple" way of using DBIx::Class needs less classes than the "schema"
52 way but doesn't give you the ability to easily use different database connections.
53
54 Some examples where different database connections are useful are:
55
56 different users with different rights
57 different databases with the same schema.
58
59 =head2 Simple
60
61 First you need to create a base class which all other classes will inherit from.
62 See L<DBIx::Class::DB> for information on how to do this.
63
64 Then you need to create a class for every table you want to use with DBIx::Class.
65 See L<DBIx::Class::Table> for information on how to do this.
66
67 =head2 Schema
68
69 With this approach, the table classes inherit directly from DBIx::Class::Core,
70 although it might be a good idea to create a "parent" class for all table
71 classes that inherits from DBIx::Class::Core and adds additional methods
72 needed by all table classes, e.g. reading a config file or loading auto primary
73 key support.
74
75 Look at L<DBIx::Class::Schema> for information on how to do this.
76
77 If you need more help, check out the introduction in the 
78 manual below.
79
80 =head1 SEE ALSO
81
82 =head2 L<DBIx::Class::Core> - DBIC Core Classes
83
84 =head2 L<DBIx::Class::Manual> - User's manual
85
86 =head2 L<DBIx::Class::CDBICompat> - L<Class::DBI> Compat layer
87
88 =head2 L<DBIx::Class::DB> - database-level methods
89
90 =head2 L<DBIx::Class::Table> - table-level methods
91
92 =head2 L<DBIx::Class::Row> - row-level methods
93
94 =head2 L<DBIx::Class::PK> - primary key methods
95
96 =head2 L<DBIx::Class::ResultSet> - search result-set methods
97
98 =head2 L<DBIx::Class::Relationship> - relationships between tables
99
100 =head1 AUTHOR
101
102 Matt S. Trout <mst@shadowcatsystems.co.uk>
103
104 =head1 CONTRIBUTORS
105
106 Andy Grundman <andy@hybridized.org>
107
108 Brian Cassidy <bricas@cpan.org>
109
110 Dan Kubb <dan.kubb-cpan@onautopilot.com>
111
112 Dan Sully <daniel@cpan.org>
113
114 David Kamholz <dkamholz@cpan.org>
115
116 Jules Bean
117
118 Marcus Ramberg <mramberg@cpan.org>
119
120 Paul Makepeace
121
122 =head1 LICENSE
123
124 You may distribute this code under the same terms as Perl itself.
125
126 =cut
127