Skip to content

Commit c0e9a9d

Browse files
committed
Add session_timeout and session_check settings typings
1 parent 9f3e31e commit c0e9a9d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/client-common/src/settings.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,9 +1581,24 @@ interface ClickHouseServerSettings {
15811581
zstd_window_log_max?: Int64
15821582
}
15831583

1584+
/** @see https://clickhouse.com/docs/en/interfaces/http */
15841585
interface ClickHouseHTTPSettings {
1586+
/** Ensures that the entire response is buffered.
1587+
* In this case, the data that is not stored in memory will be buffered in a temporary server file.
1588+
* This could help prevent errors that might occur during the streaming of SELECT queries.
1589+
* Additionally, this is useful when executing DDLs on clustered environments,
1590+
* as the client will receive the response only when the DDL is applied on all nodes of the cluster. */
15851591
wait_end_of_query: Bool
1592+
/** Format to use if a SELECT query is executed without a FORMAT clause.
1593+
* Only useful for the {@link ClickHouseClient.exec} method,
1594+
* as {@link ClickHouseClient.query} method always attaches this clause. */
15861595
default_format: DataFormat
1596+
/** By default, the session is terminated after 60 seconds of inactivity
1597+
* This is regulated by the `default_session_timeout` server setting. */
1598+
session_timeout: UInt64
1599+
/** To check the session status, you can use this setting.
1600+
* If a session is expired or cannot be found, server returns `SESSION_NOT_FOUND` with error code 372. */
1601+
session_check: Bool
15871602
}
15881603

15891604
export type ClickHouseSettings = Partial<ClickHouseServerSettings> &

0 commit comments

Comments
 (0)