CHATGPT AI
finding
_id
WHERE
finding_id = %s
""", (finding_id,))

return self.cursor.fetchone()

def get_findings(self, finding_ids):
"""
Get findings from the database by their ids.

:param finding_ids: A list of finding ids to retrieve from the database.
:return: A list of findings retrieved from the database.
"""

self.cursor.execute("""
SELECT
*
FROM
findings
WHERE
finding_id IN %s;""", (tuple(finding_ids),))

return self.cursor.fetchall()

def get_findings_by_test(self, test):
"""
Get findings from the database by their associated test name.

:param test: The name of the test associated with the findings to retrieve from the database.
:return: A list of findings retrieved from the database for a given test name.
"""

self.cursor.execute("""SELECT * FROM findings WHERE test = %s;""", (test,))

return self.cursor.fetchall()

def get_findings_by_severity(self, severity):
"""Get all findings with a given severity level."""

self._check_severity(severity)

_id WHERE finding_id = %s """, (finding_id,)) return self.cursor.fetchone() def get_findings(self, finding_ids): """ Get findings from the database by their ids. :param finding_ids: A list of finding ids to retrieve from the database. :return: A list of findings retrieved from the database. """ self.cursor.execute(""" SELECT * FROM findings WHERE finding_id IN %s;""", (tuple(finding_ids),)) return self.cursor.fetchall() def get_findings_by_test(self, test): """ Get findings from the database by their associated test name. :param test: The name of the test associated with the findings to retrieve from the database. :return: A list of findings retrieved from the database for a given test name. """ self.cursor.execute("""SELECT * FROM findings WHERE test = %s;""", (test,)) return self.cursor.fetchall() def get_findings_by_severity(self, severity): """Get all findings with a given severity level.""" self._check_severity(severity)
0 Comments & Tags 0 Μοιράστηκε 1 Views

Password Copied!

Please Wait....