From: Jess Robinson Date: Fri, 10 Nov 2006 18:17:36 +0000 (+0000) Subject: Documentation updates: X-Git-Tag: v0.07003~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d7be2784737922b7a48b83c8aff81e67580122d6;p=dbsrgits%2FDBIx-Class.git Documentation updates: add_columns column_info keys resultset_class example --- diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 1be530e..e9c9e90 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -99,29 +99,31 @@ whatever your database supports. =item size The length of your column, if it is a column type that can have a size -restriction. This is currently not used by DBIx::Class. +restriction. This is currently only used by L. =item is_nullable Set this to a true value for a columns that is allowed to contain -NULL values. This is currently not used by DBIx::Class. +NULL values. This is currently only used by L. =item is_auto_increment Set this to a true value for a column whose value is somehow automatically set. This is used to determine which columns to empty -when cloning objects using C. +when cloning objects using C. It is also used by +L. =item is_foreign_key Set this to a true value for a column that contains a key from a -foreign table. This is currently not used by DBIx::Class. +foreign table. This is currently only used by +L. =item default_value Set this to the default value which will be inserted into a column by the database. Can contain either a value or a function. This is -currently not used by DBIx::Class. +currently only used by L. =item sequence @@ -130,6 +132,14 @@ generate a new key value. If not specified, L will attempt to retrieve the name of the sequence from the database automatically. +=item extras + +This is used by L and L +to add extra non-generic data to the column. For example: C<< extras +=> { unsigned => 1} >> is used by the MySQL producer to set an integer +column to unsigned. For more details, see +L. + =back =head2 add_column @@ -925,12 +935,20 @@ but is cached from then on unless resultset_class changes. =head2 resultset_class +` package My::ResultSetClass; + use base 'DBIx::Class::ResultSet'; + ... + + $source->resultset_class('My::ResultSet::Class'); + Set the class of the resultset, this is useful if you want to create your own resultset methods. Create your own class derived from -L, and set it here. +L, and set it here. =head2 resultset_attributes + $source->resultset_attributes({ order_by => [ 'id' ] }); + Specify here any attributes you wish to pass to your specialised resultset. =cut