/** * SMI-865: Quarantine Repository SQL Queries * * SQL query constants for quarantine management operations. */ /** * SQL query to insert a new quarantine entry */ export declare const INSERT_QUERY = "\n INSERT INTO quarantine (\n id, skill_id, source, quarantine_reason, severity,\n detected_patterns, quarantine_date, reviewed_by, review_status,\n review_notes, review_date, created_at, updated_at\n )\n VALUES (?, ?, ?, ?, ?, ?, datetime('now'), ?, ?, ?, ?, datetime('now'), datetime('now'))\n"; /** * SQL query to select a quarantine entry by ID */ export declare const SELECT_BY_ID_QUERY = "\n SELECT * FROM quarantine WHERE id = ?\n"; /** * SQL query to select quarantine entries by skill ID */ export declare const SELECT_BY_SKILL_ID_QUERY = "\n SELECT * FROM quarantine WHERE skill_id = ? ORDER BY quarantine_date DESC\n"; /** * SQL query to select all quarantine entries with pagination */ export declare const SELECT_ALL_QUERY = "\n SELECT * FROM quarantine ORDER BY quarantine_date DESC LIMIT ? OFFSET ?\n"; /** * SQL query to count all quarantine entries */ export declare const SELECT_COUNT_QUERY = "\n SELECT COUNT(*) as count FROM quarantine\n"; /** * SQL query to update a quarantine entry */ export declare const UPDATE_QUERY = "\n UPDATE quarantine SET\n quarantine_reason = COALESCE(?, quarantine_reason),\n severity = COALESCE(?, severity),\n detected_patterns = COALESCE(?, detected_patterns),\n reviewed_by = COALESCE(?, reviewed_by),\n review_status = COALESCE(?, review_status),\n review_notes = COALESCE(?, review_notes),\n review_date = CASE WHEN ? IS NOT NULL THEN datetime('now') ELSE review_date END,\n updated_at = datetime('now')\n WHERE id = ?\n"; /** * SQL query to delete a quarantine entry by ID */ export declare const DELETE_QUERY = "\n DELETE FROM quarantine WHERE id = ?\n"; /** * SQL query to delete all quarantine entries for a skill */ export declare const DELETE_BY_SKILL_ID_QUERY = "\n DELETE FROM quarantine WHERE skill_id = ?\n"; /** * SQL query to get total count */ export declare const STATS_TOTAL_QUERY = "SELECT COUNT(*) as count FROM quarantine"; /** * SQL query to get counts by severity */ export declare const STATS_BY_SEVERITY_QUERY = "SELECT severity, COUNT(*) as count FROM quarantine GROUP BY severity"; /** * SQL query to get counts by review status */ export declare const STATS_BY_STATUS_QUERY = "SELECT review_status, COUNT(*) as count FROM quarantine GROUP BY review_status"; /** * SQL query to get pending review count */ export declare const STATS_PENDING_QUERY = "SELECT COUNT(*) as count FROM quarantine WHERE review_status = 'pending'"; /** * SQL query to get date range */ export declare const STATS_RANGE_QUERY = "SELECT MIN(quarantine_date) as oldest, MAX(quarantine_date) as newest FROM quarantine"; //# sourceMappingURL=queries.d.ts.map