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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user