1 # This module is part of debbugs, and is released
2 # under the terms of the GPL version 2, or any later version. See the
3 # file README and COPYING for more information.
4 # Copyright 2017 by Don Armstrong <don@donarmstrong.com>.
6 package Debbugs::DB::ResultSet::SrcAssociation;
10 Debbugs::DB::ResultSet::SrcAssociation - Source/Suite Associations
25 use base 'DBIx::Class::ResultSet';
27 use Debbugs::DB::Util qw(select_one);
30 sub insert_suite_src_ver_association {
31 my ($self,$suite_id,$src_ver_id) = @_;
32 return $self->result_source->schema->storage->
34 my ($s,$dbh,$suite_id,$src_ver_id) = @_;
35 return select_one($dbh,<<'SQL',$suite_id,$src_ver_id);
36 INSERT INTO src_associations (suite,source)
37 VALUES (?,?) ON CONFLICT (suite,source) DO
38 UPDATE SET modified = NOW()