File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,14 @@ use Http\Client\Curl\Client;
5151use Nyholm\Psr7\Factory\Psr17Factory;
5252use SimPod\ClickHouseClient\Client\PsrClickHouseClient;
5353use SimPod\ClickHouseClient\Client\Http\RequestFactory;
54+ use SimPod\ClickHouseClient\Param\ParamValueConverterRegistry;
5455
5556$psr17Factory = new Psr17Factory;
5657
5758$clickHouseClient = new PsrClickHouseClient(
5859 new Client(),
5960 new RequestFactory(
61+ new ParamValueConverterRegistry(),
6062 $psr17Factory,
6163 $psr17Factory
6264 ),
@@ -250,6 +252,7 @@ provide a converter for a type that the library does not (yet) support, pass the
250252` ` ` php
251253<?php
252254
255+ use SimPod\C lickHouseClient\C lient\H ttp\R equestFactory;
253256use SimPod\C lickHouseClient\C lient\P srClickHouseClient;
254257use SimPod\C lickHouseClient\E xception\Unsupport edParamValue;
255258use SimPod\C lickHouseClient\P aram\P aramValueConverterRegistry;
@@ -258,7 +261,7 @@ $paramValueConverterRegistry = new ParamValueConverterRegistry([
258261 'datetime' => static fn (mixed $v) => $v instanceof DateTimeInterface ? $v->format('c') : throw UnsupportedParamValue::type($value)
259262]);
260263
261- $client = new PsrClickHouseClient($paramValueConverterRegistry, ...);
264+ $client = new PsrClickHouseClient(..., new RequestFactory( $paramValueConverterRegistry, ...) );
262265` ` `
263266
264267Be aware that the library can not ensure that passed values have a certain type. They are passed as-is and closures must accept `mixed` values.
You can’t perform that action at this time.
0 commit comments