You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
719 B
29 lines
719 B
<?php
|
|
|
|
namespace Darksparrow\DeegraphInteractions\QueryBuilder\SelectQuery;
|
|
|
|
use Darksparrow\DeegraphInteractions\Core\DeegraphServer;
|
|
use Darksparrow\DeegraphInteractions\DataStructures\UUID;
|
|
|
|
class SelectQuery
|
|
{
|
|
protected string $QueryString;
|
|
|
|
public function __construct(string $queryString)
|
|
{
|
|
$this->QueryString = $queryString;
|
|
}
|
|
public function __toString()
|
|
{
|
|
return $this->QueryString;
|
|
}
|
|
|
|
public function runQuery(UUID $actorID, DeegraphServer $server): SelectQueryResponse
|
|
{
|
|
$response = $server->runQuery(
|
|
actorID: $actorID,
|
|
queryString: $this->QueryString,
|
|
);
|
|
return new SelectQueryResponse($response);
|
|
}
|
|
}
|
|
|