-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJson.php
More file actions
29 lines (23 loc) · 628 Bytes
/
Json.php
File metadata and controls
29 lines (23 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
declare(strict_types=1);
namespace SimPod\ClickHouseClient\Format;
use JsonException;
use SimPod\ClickHouseClient\Output\Output;
/**
* @template T
* @implements Format<\SimPod\ClickHouseClient\Output\Json<T>>
*/
final readonly class Json implements Format
{
/** @throws JsonException */
public static function output(string $contents): Output
{
/** @var \SimPod\ClickHouseClient\Output\Json<T> $output */
$output = new \SimPod\ClickHouseClient\Output\Json($contents);
return $output;
}
public static function toSql(): string
{
return 'FORMAT JSON';
}
}