Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/storage/db.py
Show First 20 Lines • Show All 530 Lines • ▼ Show 20 Lines | ): | ||||
where tool_name=%%s and | where tool_name=%%s and | ||||
tool_version=%%s and | tool_version=%%s and | ||||
tool_configuration=%%s""" | tool_configuration=%%s""" | ||||
% (",".join(self.indexer_configuration_cols)), | % (",".join(self.indexer_configuration_cols)), | ||||
(tool_name, tool_version, tool_configuration), | (tool_name, tool_version, tool_configuration), | ||||
) | ) | ||||
return cur.fetchone() | return cur.fetchone() | ||||
def indexer_configuration_get_from_id(self, id_, cur=None): | |||||
cur = self._cursor(cur) | |||||
cur.execute( | |||||
"""select %s | |||||
from indexer_configuration | |||||
where id=%%s""" | |||||
% (",".join(self.indexer_configuration_cols)), | |||||
(id_,), | |||||
) | |||||
return cur.fetchone() |