0.1.0
Breaking changes
connect_timeout
client setting is removed, as it was unused in the code.
New features
command
method is introduced as an alternative toexec
.
command
does not expect user to consume the response stream, and it is destroyed immediately.
Essentially, this is a shortcut toexec
that destroys the stream under the hood.
Consider usingcommand
instead ofexec
for 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')