'Get the repo from the DB.
:param  decoded_repo_id:       decoded repo id
:type   decoded_repo_id:       int
:returns:   the requested repo
:rtype:     Repository'

def get(self, trans, decoded_repo_id):

    try:
        repo = trans.sa_session.query(trans.app.model.Repository).filter((trans.app.model.Repository.table.c.id == decoded_repo_id)).one()
    except MultipleResultsFound:
        raise InconsistentDatabase('Multiple    repositories    found    with    the    same    id.')
    except NoResultFound:
        raise RequestParameterInvalidException('No    repository    found    with    the    id    provided.')
    except Exception:
        raise InternalServerError('Error    loading    from    the    database.')
    return repo
