Add pruning support (#12)

This commit is contained in:
2024-04-29 23:01:49 -04:00
parent 473dded4f9
commit d8ba178c55
4 changed files with 126 additions and 47 deletions

View File

@@ -98,4 +98,14 @@ class Data {
if (is_null($dbConn)) $db->close();
}
}
/**
* Return the last SQLite error message as a result array
*
* @param SQLite3 $db The database connection on which the error has occurred
* @return string[] ['error' => message] for last SQLite error message
*/
public static function error(SQLite3 $db): array {
return ['error' => 'SQLite error: ' . $db->lastErrorMsg()];
}
}