-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormattedInsertStatement.php
More file actions
44 lines (40 loc) · 1.23 KB
/
FormattedInsertStatement.php
File metadata and controls
44 lines (40 loc) · 1.23 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace Utopia\Query\Builder\ClickHouse;
use Closure;
use Utopia\Query\Builder\Statement;
readonly class FormattedInsertStatement extends Statement
{
/**
* @param string $query
* @param list<mixed> $bindings
* @param list<string> $columns
* @param string $format
* @param ?string $body Serialized payload to ship as the HTTP request body alongside `$query`. Null when only the envelope query was produced (the caller assembles the body separately).
* @param bool $readOnly
* @param (Closure(Statement): (array<mixed>|int))|null $executor
*/
public function __construct(
string $query,
array $bindings,
public array $columns,
public string $format,
public ?string $body = null,
bool $readOnly = false,
?Closure $executor = null,
) {
parent::__construct($query, $bindings, $readOnly, $executor);
}
#[\Override]
public function withExecutor(Closure $executor): self
{
return new self(
$this->query,
$this->bindings,
$this->columns,
$this->format,
$this->body,
$this->readOnly,
$executor,
);
}
}