[Koha-bugs] [Bug 17783] Optimize Koha::IssuingRules->get_effective_issuing_rule

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 20 18:08:13 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17783

--- Comment #17 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 58311
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58311&action=edit
Bug 17783: Add Koha::Objects->single

Returns one and only one object that is part of this set.
Returns undef if there are no objects found.

->single is faster than ->search->next

This is optimal as it will grab the first returned result without instantiating
a cursor.

It is useful for this Bug as we only want to select the top row of found
issuing
rules.

To test:
1. Run t/db_dependent/Koha/Objects.t

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart at biblibre.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list