From: Daniel Westermann-Clark Date: Mon, 17 Apr 2006 22:19:55 +0000 (-0400) Subject: Documentation cleanup X-Git-Tag: v0.07002~75^2~237^2~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=58b5bb8c54b31193d959d2669dda3a91483aeefe;p=dbsrgits%2FDBIx-Class.git Documentation cleanup --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 7c7958c..6bf92be 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -292,7 +292,9 @@ source, including the primary key. If the C is specified as C, it searches only on the primary key. -See also L and L. +See also L and L. For information on how to +declare unique constraints, see +L. =cut @@ -420,7 +422,7 @@ sub cursor { my $cd = $schema->resultset('CD')->single({ year => 2001 }); Inflates the first result without creating a cursor if the resultset has -any records in it; if not returns nothing. Used by find() as an optimisation. +any records in it; if not returns nothing. Used by L as an optimisation. =cut @@ -1091,7 +1093,7 @@ sub new_result { Find an existing record from this resultset. If none exists, instantiate a new result object and return it. The object will not be saved into your storage -until you call L on it. +until you call L on it. If you want objects to be saved immediately, use L instead. @@ -1161,7 +1163,8 @@ constraint. For example: { key => 'artist_title' } ); -See also L and L. +See also L and L. For information on how to declare +unique constraints, see L. =cut @@ -1208,7 +1211,8 @@ source, including the primary key. If the C is specified as C, it searches only on the primary key. -See also L and L. +See also L and L. For information on how to declare +unique constraints, see L. =cut diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 1caf03c..17e1bf0 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -283,15 +283,16 @@ sub primary_columns { =head2 add_unique_constraint Declare a unique constraint on this source. Call once for each unique -constraint. Unique constraints are used when you call C on a -L. Only columns in the constraint are searched, -for example: +constraint. # For UNIQUE (column1, column2) __PACKAGE__->add_unique_constraint( constraint_name => [ qw/column1 column2/ ], ); +Unique constraints are used, for example, when you call +L. Only columns in the constraint are searched. + =cut sub add_unique_constraint {