Commit | Line | Data |
7e4b2f59 |
1 | NAME |
2 | DBIx::Class - Extensible and flexible object <-> relational mapper. |
3 | |
4 | SYNOPSIS |
5 | DESCRIPTION |
6 | This is a sql to oop mapper, inspired by the Class::DBI framework, and |
7 | meant to support compability with it, while restructuring the insides, |
8 | and making it possible to support some new features like self-joins, |
9 | distinct, group bys and more. |
10 | |
773e3015 |
11 | This project is still at an early stage so the maintainers don't make |
12 | any absolute promise that full backwards-compatibility will be |
13 | supported; however if we can without compromising the improvements we're |
14 | trying to make, we will, and any non-compatible changes will merit a |
15 | full justification on the mailing list and a CPAN developer release for |
16 | people to test against. |
7e4b2f59 |
17 | |
18 | The community can be found via - |
19 | |
20 | Mailing list: http://lists.rawmode.org/mailman/listinfo/dbix-class/ |
21 | |
22 | SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ |
23 | |
24 | Wiki: http://dbix-class.shadowcatsystems.co.uk/ |
25 | |
26 | IRC: irc.perl.org#dbix-class |
27 | |
28 | QUICKSTART |
8c130052 |
29 | If you're using Class::DBI, and want an easy and fast way of migrating |
30 | to DBIx::Class look at DBIx::Class::CDBICompat. |
7e4b2f59 |
31 | |
8c130052 |
32 | There are two ways of using DBIx::Class, the 'simple' and the 'schema' |
33 | one. |
7e4b2f59 |
34 | |
8c130052 |
35 | The 'simple' way of using DBIx::Class needs less classes than the |
36 | 'schema' way but doesn't give you the ability to use different database |
37 | connections. |
7e4b2f59 |
38 | |
8c130052 |
39 | Some examples where different database connections are useful are: |
7e4b2f59 |
40 | |
8c130052 |
41 | different users with different rights different databases with the same |
42 | schema. |
7e4b2f59 |
43 | |
8c130052 |
44 | Simple |
45 | First you need to create a base class all other classes inherit from. |
7e4b2f59 |
46 | |
8c130052 |
47 | Look at DBIx::Class::DB how to do this |
7e4b2f59 |
48 | |
8c130052 |
49 | Next you need to create a class for every table you want to use with |
50 | DBIx::Class. |
7e4b2f59 |
51 | |
8c130052 |
52 | Look at DBIx::Class::Table how to do this. |
7e4b2f59 |
53 | |
8c130052 |
54 | Schema |
55 | With this approach the table classes inherit directly from |
56 | DBIx::Class::Core, although it might be a good idea to create a 'parent' |
57 | class for all table classes which inherits from DBIx::Class::Core and |
58 | adds additional methods needed by all table classes, e.g. reading a |
59 | config file, loading auto primary key support. |
7e4b2f59 |
60 | |
8c130052 |
61 | Look at DBIx::Class::Schema how to do this. |
62 | |
63 | If you need more hand-holding, check out the introduction in the manual |
64 | below. |
65 | |
66 | SEE ALSO |
67 | DBIx::Class::Core - DBIC Core Classes |
68 | DBIx::Class::CDBICompat - Class::DBI Compat layer. |
69 | DBIx::Class::Manual - User's manual. |
7e4b2f59 |
70 | |
71 | AUTHOR |
72 | Matt S. Trout <mst@shadowcatsystems.co.uk> |
73 | |
74 | CONTRIBUTORS |
75 | Andy Grundman <andy@hybridized.org> |
76 | |
77 | Brian Cassidy <bricas@cpan.org> |
78 | |
79 | Dan Kubb <dan.kubb-cpan@onautopilot.com> |
80 | |
81 | Dan Sully <daniel@cpan.org> |
82 | |
83 | davekam |
84 | |
85 | Marcus Ramberg <mramberg@cpan.org> |
86 | |
87 | LICENSE |
88 | You may distribute this code under the same terms as Perl itself. |
89 | |