INNER CODE UNIT · Python

get

yashab-cyber/HackGpt · workbench/server.py:152

    def get(self, run_id):
        with closing(sqlite3.connect(self.path)) as connection:
            row = connection.execute(
                "SELECT content FROM reports WHERE id = ?", (run_id,)
            ).fetchone()
        if not row:
            return None
        report = json.loads(row[0])
        if not verify_integrity(report):
            raise ValueError("Stored report checksum mismatch")
        return report

    def recent(self):
        with closing(sqlite3.connect(self.path)) as connection:
            rows = connection.execute(
                "SELECT content FROM reports ORDER BY started DESC LIMIT 50"
            ).fetchall()
        result = []

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…