Interface BaseClickHouseClientConfigOptions

Hierarchy

  • BaseClickHouseClientConfigOptions

Properties

additional_headers?: Record<string, string>

Deprecated

since version 1.0.0. Use http_headers instead.
Additional HTTP headers to attach to the outgoing requests.

Default

empty object
application?: string

The name of the application using the JS client.

Default

empty string
clickhouse_settings?: ClickHouseSettings

ClickHouse settings to apply to all requests.

Default

empty object
compression?: {
    request?: boolean;
    response?: boolean;
}

Request and response compression settings.

Type declaration

  • Optional request?: boolean

    request: true enabled compression on the client request body.

    Default

    false
    
  • Optional response?: boolean

    response: true instructs ClickHouse server to respond with compressed response body.
    This will add Accept-Encoding: gzip header in the request and enable_http_compression=1 ClickHouse HTTP setting.

    Warning: Response compression can't be enabled for a user with readonly=1, as ClickHouse will not allow settings modifications for such user.

    Default

    false
    
database?: string

Database name to use.

Default

default
host?: string

Deprecated

since version 1.0.0. Use url instead.
A ClickHouse instance URL.

Default

http://localhost:8123
http_headers?: Record<string, string>

Additional HTTP headers to attach to the outgoing requests.

Default

empty object
keep_alive?: {
    enabled?: boolean;
}

HTTP Keep-Alive related settings.

Type declaration

  • Optional enabled?: boolean

    Enable or disable HTTP Keep-Alive mechanism.

    Default

    true
    
log?: {
    LoggerClass?: (new () => Logger);
    level?: ClickHouseLogLevel;
}

Type declaration

  • Optional LoggerClass?: (new () => Logger)
      • new (): Logger
      • A class to instantiate a custom logger implementation.

        Returns Logger

        Default

        see {@link DefaultLogger}
        
  • Optional level?: ClickHouseLogLevel

    Default

    set to {@link ClickHouseLogLevel.OFF}
    
max_open_connections?: number

Maximum number of sockets to allow per host.

Default

10
password?: string

The user password.

Default

empty string
pathname?: string

An optional pathname to add to the ClickHouse URL after it is parsed by the client. For example, if you use a proxy, and your ClickHouse instance can be accessed as http://proxy:8123/clickhouse_server, specify clickhouse_server here (with or without a leading slash); otherwise, if provided directly in the url, it will be considered as the database option.
Multiple segments are supported, e.g. /my_proxy/db.

Default

empty string
request_timeout?: number

The request timeout in milliseconds.

Default

30_000
session_id?: string

ClickHouse Session id to attach to the outgoing requests.

Default

empty string (no session)
url?: string | URL

A ClickHouse instance URL.

Default

http://localhost:8123
username?: string

The name of the user on whose behalf requests are made.

Default

default

Generated using TypeDoc