@clickhouse/client 0.1.0
Breaking changes
connect_timeoutclient setting is removed, as it was unused in the code.
New features
commandmethod is introduced as an alternative toexec.commanddoes not expect user to consume the response stream, and it is destroyed immediately. Essentially, this is a shortcut toexecthat destroys the stream under the hood. Consider usingcommandinstead ofexecfor DDLs and other custom commands which do not provide any valuable output.
Example:
// incorrect: stream is not consumed and not destroyed, request will be timed out eventually
await client.exec('CREATE TABLE foo (id String) ENGINE Memory')
// correct: stream does not contain any information and just destroyed
const { stream } = await client.exec('CREATE TABLE foo (id String) ENGINE Memory')
stream.destroy()
// correct: same as exec + stream.destroy()
await client.command('CREATE TABLE foo (id String) ENGINE Memory')