Remove dead prepareCheckStatement/prepareInsertStatement helpers

These helpers were no longer called after the v2 migration rewrote
processLogEntries and fetchAndStoreLogPage (the latter now prepares its
own idempotent INSERT inline). Rendered unused by the v2 migration.
This commit is contained in:
Keith Solomon
2026-08-03 14:16:16 -05:00
parent 9fa5247445
commit 89ecaaa6c7
-24
View File
@@ -104,30 +104,6 @@ function validateApiResponse($responseData) {
} }
} }
/**
* Prepare a PDO statement for checking if a given vault transaction already exists in the database.
*
* @param PDO $pdo The PDO instance to prepare the statement with
*
* @return PDOStatement The prepared statement
*/
function prepareCheckStatement($pdo) {
$checkQuery = "SELECT COUNT(*) FROM vault WHERE user = :user AND timestamp = :timestamp AND amount = :amount";
return $pdo->prepare($checkQuery);
}
/**
* Prepare a PDO statement for inserting a new vault transaction into the database.
*
* @param PDO $pdo The PDO instance to prepare the statement with
*
* @return PDOStatement The prepared statement
*/
function prepareInsertStatement($pdo) {
$insertQuery = "INSERT INTO vault (ID, user, timestamp, description, amount) VALUES (:id, :user, :timestamp, :description, :amount)";
return $pdo->prepare($insertQuery);
}
/** /**
* Process an array of log entries retrieved from the Torn v2 API. * Process an array of log entries retrieved from the Torn v2 API.
* *