-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJsonCompact.php
More file actions
29 lines (23 loc) · 663 Bytes
/
JsonCompact.php
File metadata and controls
29 lines (23 loc) · 663 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\JsonCompact<T>>
*/
final readonly class JsonCompact implements Format
{
/** @throws JsonException */
public static function output(string $contents): Output
{
/** @var \SimPod\ClickHouseClient\Output\JsonCompact<T> $output */
$output = new \SimPod\ClickHouseClient\Output\JsonCompact($contents);
return $output;
}
public static function toSql(): string
{
return 'FORMAT JSONCompact';
}
}