It should be used for statements that do not have any output, when the format clause is not applicable, or when you are not interested in the response at all. Response stream is destroyed immediately as we do not expect useful information there. Examples of such statements are DDLs or custom inserts.
if you have a custom query that does not work with ClickHouseClient.query, and you are interested in the response data, consider using ClickHouseClient.exec.
Similar to ClickHouseClient.command, but for the cases where the output is expected, but format clause is not applicable. The caller of this method must consume the stream, as the underlying socket will not be released until then, and the request will eventually be timed out.
it is not intended to use this method to execute the DDLs, such as CREATE TABLE
or similar;
use ClickHouseClient.command instead.
The primary method for data insertion. It is recommended to avoid arrays in case of large inserts to reduce application memory consumption and consider streaming for most of such use cases. As the insert operation does not provide any output, the response stream is immediately destroyed.
in case of a custom insert operation (e.g., INSERT FROM SELECT
),
consider using ClickHouseClient.command, passing the entire raw query there
(including the FORMAT
clause).
Generated using TypeDoc
Shuts down the underlying connection. This method should ideally be called only once per application lifecycle, for example, during the graceful shutdown phase.