Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 78ed32f8

Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt

  • ID 78ed32f8eab988c9b5dacfeef96b4d7384b3a4b2
  • Vorgänger 913348ce
  • Nachfolger 9dd27bda

SL::DB::Helper::Manager: mehr Dokumentation

Unterschiede anzeigen:

SL/DB/Helper/Manager.pm
83 83
work. Later you can use C<SL::DB::Unit-E<gt>load_cached> to retrieve
84 84
individual objects and be sure that they're already cached.
85 85

  
86
=item C<find_by>
86
=item C<find_by @where>
87 87

  
88
TODO: Describe find_by
88
Retrieves one item from the corresponding table matching the
89
conditions given in C<@where>.
89 90

  
90
=item C<find_by_or_create>
91
This is shorthand for the following call:
91 92

  
92
TODO: Describe find_by_or_create
93
    SL::DB::Manager::SomeClass->get_all(where => [ … ], limit => 1)
93 94

  
94
=item C<get_first>
95
=item C<find_by_or_create @where>
95 96

  
96
TODO: Describe get_first
97
This calls L</find_by> with C<@where> and returns its result if one is
98
found.
97 99

  
98
=item C<make_manager_methods>
100
If none is found, a new instance of the corresponding DB object class
101
is created and returned. Such a new object is not inserted into the
102
database automatically.
99 103

  
100
TODO: Describe make_manager_methods
104
=item C<get_first @args>
105

  
106
Retrieves the first item from the database by calling C<get_all> with
107
a limit of 1. The C<@args> are passed through to C<get_all> allowing
108
for arbitrary filters and sort options to be applied.
109

  
110
=item C<make_manager_methods [@method_list]>
111

  
112
Calls Rose's C<make_manager_methods> with the C<@method_list> or
113
C<all> if no methods are given.
101 114

  
102 115
=back
103 116

  

Auch abrufbar als: Unified diff