*/
public function __construct(string $message, int $code, string $query, Throwable $previous = null)
{
- $this->query = $query;
-
parent::__construct(sprintf('"%s" at "%s"', $message, $query) , $code, $previous);
+ $this->query = $query;
}
/**
public function remove(Entity\DeliveryQueueItem $deliveryQueueItem): bool
{
- return $this->db->delete(self::$table_name, ['uri-id' => $deliveryQueueItem->postUriId,
- 'gsid' => $deliveryQueueItem->targetServerId]);
+ return $this->db->delete(self::$table_name, [
+ 'uri-id' => $deliveryQueueItem->postUriId,
+ 'gsid' => $deliveryQueueItem->targetServerId
+ ]);
}
public function removeFailedByServerId(int $gsid, int $failedThreshold): bool
public function incrementFailed(Entity\DeliveryQueueItem $deliveryQueueItem): bool
{
- return $this->db->update(self::$table_name, ["`failed` = `failed` + 1"],
- ["`uri-id` = ? AND `gsid` = ?",
- $deliveryQueueItem->postUriId,
- $deliveryQueueItem->targetServerId
- ]);
+ return $this->db->update(self::$table_name, [
+ "`failed` = `failed` + 1"
+ ], [
+ "`uri-id` = ? AND `gsid` = ?",
+ $deliveryQueueItem->postUriId,
+ $deliveryQueueItem->targetServerId
+ ]);
}
public function optimizeStorage(): bool