From ea4d4f53f6a4de569a3bd07f6cf29e8f771f0b99 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 26 Feb 2017 07:42:22 -0800 Subject: [PATCH] document Debbugs::DB::ResultSet --- Debbugs/DB/ResultSet/Maintainer.pm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Debbugs/DB/ResultSet/Maintainer.pm b/Debbugs/DB/ResultSet/Maintainer.pm index 280a6e5..7c889f3 100644 --- a/Debbugs/DB/ResultSet/Maintainer.pm +++ b/Debbugs/DB/ResultSet/Maintainer.pm @@ -27,7 +27,20 @@ use base 'DBIx::Class::ResultSet'; use Debbugs::DB::Util qw(select_one); +=over +=item get_maintainers + + $s->resultset('Maintainers')->get_maintainers(); + + $s->resultset('Maintainers')->get_maintainers(@maints); + +Retrieve a HASHREF of all maintainers with the maintainer name as the key and +the id of the database as the value. If given an optional list of maintainers, +adds those maintainers to the database if they do not already exist in the +database. + +=cut sub get_maintainers { my ($self,@maints) = @_; my %maints; @@ -53,6 +66,16 @@ sub get_maintainers { return \%maints; } +=item get_maintainer_id + + $s->resultset('Maintainer')->get_maintainer_id('Foo Bar ') + +Given a maintainer name returns the maintainer id, possibly inserting the +maintainer (and correspondent) if either do not exist in the database. + + +=cut + sub get_maintainer_id { my ($self,$maint) = @_; my $rs = @@ -85,6 +108,10 @@ SQL ); } +=back + +=cut + 1; __END__ -- 2.39.2