From 78ed32f8eab988c9b5dacfeef96b4d7384b3a4b2 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 20 Dec 2016 16:28:59 +0100 Subject: [PATCH] SL::DB::Helper::Manager: mehr Dokumentation --- SL/DB/Helper/Manager.pm | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/SL/DB/Helper/Manager.pm b/SL/DB/Helper/Manager.pm index c44f67953..9cc94bf79 100644 --- a/SL/DB/Helper/Manager.pm +++ b/SL/DB/Helper/Manager.pm @@ -83,21 +83,34 @@ Ccache_all> before you start the actual work. Later you can use Cload_cached> to retrieve individual objects and be sure that they're already cached. -=item C +=item C -TODO: Describe find_by +Retrieves one item from the corresponding table matching the +conditions given in C<@where>. -=item C +This is shorthand for the following call: -TODO: Describe find_by_or_create + SL::DB::Manager::SomeClass->get_all(where => [ … ], limit => 1) -=item C +=item C -TODO: Describe get_first +This calls L with C<@where> and returns its result if one is +found. -=item C +If none is found, a new instance of the corresponding DB object class +is created and returned. Such a new object is not inserted into the +database automatically. -TODO: Describe make_manager_methods +=item C + +Retrieves the first item from the database by calling C with +a limit of 1. The C<@args> are passed through to C allowing +for arbitrary filters and sort options to be applied. + +=item C + +Calls Rose's C with the C<@method_list> or +C if no methods are given. =back -- 2.20.1