sdfsf
This commit is contained in:
@@ -410,6 +410,23 @@ final class MiningRepository
|
||||
return $this->normalizeRows($stmt->fetchAll() ?: []);
|
||||
}
|
||||
|
||||
public function listRecentMeasurements(string $projectKey, int $limit = 200): array
|
||||
{
|
||||
$stmt = $this->pdo->prepare(
|
||||
'SELECT * FROM ' . $this->table('measurements') . '
|
||||
WHERE project_key = :project_key AND owner_sub = :owner_sub
|
||||
ORDER BY measured_at DESC
|
||||
LIMIT :limit'
|
||||
);
|
||||
$stmt->bindValue(':project_key', $projectKey, PDO::PARAM_STR);
|
||||
$stmt->bindValue(':owner_sub', $this->ownerSub, PDO::PARAM_STR);
|
||||
$stmt->bindValue(':limit', $limit, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
|
||||
$rows = $this->normalizeRows($stmt->fetchAll() ?: []);
|
||||
return array_reverse($rows);
|
||||
}
|
||||
|
||||
public function listAllMeasurements(string $projectKey): array
|
||||
{
|
||||
$stmt = $this->pdo->prepare(
|
||||
|
||||
Reference in New Issue
Block a user