def get_installed_repository(app, tool_shed, name, owner, changeset_revision=None, installed_changeset_revision=None):
 query = app.install_model.context.query(app.install_model.ToolShedRepository)
 tool_shed = common_util.remove_protocol_from_tool_shed_url(tool_shed)
 clause_list = [(app.install_model.ToolShedRepository.table.c.tool_shed == tool_shed), (app.install_model.ToolShedRepository.table.c.name == name), (app.install_model.ToolShedRepository.table.c.owner == owner)]
 if (changeset_revision is not None):
  clause_list.append((app.install_model.ToolShedRepository.table.c.changeset_revision == changeset_revision))
 if (installed_changeset_revision is not None):
  clause_list.append((app.install_model.ToolShedRepository.table.c.installed_changeset_revision == installed_changeset_revision))
 return query.filter(and_(*clause_list)).first()

def get_installed_repository ( app , tool_shed , name , owner , changeset_revision = None , installed_changeset_revision = None ) : query = app . install_model . context . query ( app . install_model . ToolShedRepository ) tool_shed = common_util . remove_protocol_from_tool_shed_url ( tool_shed ) clause_list = [ ( app . install_model . ToolShedRepository . table . c . tool_shed == tool_shed ) , ( app . install_model . ToolShedRepository . table . c . name == name ) , ( app . install_model . ToolShedRepository . table . c . owner == owner ) ] if ( changeset_revision is not None ) : clause_list . append ( ( app . install_model . ToolShedRepository . table . c . changeset_revision == changeset_revision ) ) if ( installed_changeset_revision is not None ) : clause_list . append ( ( app . install_model . ToolShedRepository . table . c . installed_changeset_revision == installed_changeset_revision ) ) return query . filter ( and_ ( * clause_list ) ) . first ( )
return a tool shed repository database record defined by the combination of a toolshed .