From: Jess Robinson Date: Wed, 11 Jun 2008 12:25:15 +0000 (+0000) Subject: Point at "prefetch" in the get/set cache docs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a59c4033b3be3e24b66331bf367d122c6f6bf525;p=dbsrgits%2FDBIx-Class-Historic.git Point at "prefetch" in the get/set cache docs --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index af97ebb..bcb27a4 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -22,8 +22,8 @@ DBIx::Class::ResultSet - Responsible for fetching and creating resultset. =head1 SYNOPSIS - my $rs = $schema->resultset('User')->search(registered => 1); - my @rows = $schema->resultset('CD')->search(year => 2005); + my $rs = $schema->resultset('User')->search({ registered => 1 }); + my @rows = $schema->resultset('CD')->search({ year => 2005 })->all(); =head1 DESCRIPTION @@ -53,7 +53,10 @@ In the examples below, the following table classes are used: =head1 OVERLOADING -If a resultset is used as a number it returns the C. However, if it is used as a boolean it is always true. So if you want to check if a result set has any results use C. C will always be true. +If a resultset is used in a numeric context it returns the L. +However, if it is used in a booleand context it is always true. So if +you want to check if a resultset has any results use C. +C will always be true. =head1 METHODS @@ -1802,6 +1805,9 @@ sub update_or_create { Gets the contents of the cache for the resultset, if the cache is set. +The cache is populated either by using the L attribute to +L or by calling L. + =cut sub get_cache { @@ -1823,6 +1829,9 @@ of objects of the same class as those produced by the resultset. Note that if the cache is set the resultset will return the cached objects rather than re-querying the database even if the cache attr is not set. +The contents of the cache can also be populated by using the +L attribute to L. + =cut sub set_cache {