<?php

declare(strict_types=1);

namespace App\Service;

use App\Repository\QueryRepository;

final class QueryService
{
    private QueryRepository $QueryRepository;

    public function __construct(QueryRepository $QueryRepository)
    {
        $this->QueryRepository = $QueryRepository;
    }
  
    public function sql(array $input, int $QueryId)
    {
        $data = json_decode(json_encode($input), false);

        return $this->QueryRepository->sql($QueryId, $data);
    }
}
