API Reference ch_driver v#0.1.1
Copy MarkdownModules
Native ClickHouse TCP-protocol driver, exposed as a DBConnection pool.
LZ4 compression and CityHash checksums, backed by a Rust NIF.
Opens a TCP connection to ClickHouse and runs queries over it.
DBConnection behaviour implementation for ClickHouse's native TCP
protocol.
Represents a DB::Exception (or DB::NetException) returned by the
server in an Exception packet (Server packet type 2).
Converts Elixir values into ClickHouse query parameters.
Encodes and decodes ClickHouse native-protocol packets.
Encodes and decodes ClickHouse's compressed block envelope: a checksum and a method marker wrapped around a block's bytes, LZ4-compressed or plain.
Decodes ClickHouse's "sparse" column serialization.
Decoders for ClickHouse's wrapper and compound column types: Nullable(T),
Array(T), Map(K, V), LowCardinality(T), and Decimal(P, S).
The initial packet sent by the client to open a connection.
Byte-level encoding and decoding for each ClickHouse native-protocol message: Hello, Addendum, Query (with its ClientInfo sub-structure), the empty Data packet, Ping, Exception, Progress, and ProfileInfo.
Decodes ClickHouse's "Native" block format — the columns and rows of a query result, once any compression envelope has been stripped away.
The server's response to ClientHello, describing itself.
LEB128-style unsigned varint encoding used throughout ClickHouse's native protocol for packet-type discriminants, lengths, revisions, and other small-to-medium unsigned integers.
A query for ChDriver.DBConnection: a raw SQL string, plus enough parsed
state to bind parameters to it.
The result of executing a ChDriver.Query, returned from
DBConnection.execute/3,4 via ChDriver.query/2,3.
An Enumerable that streams a query's rows one wire-protocol block at a
time, instead of loading the whole result into memory.
Parses ClickHouse column type strings, e.g. "Nullable(String)" or
"Map(String, Decimal(10, 2))", into their component parts.
The scalar/fixed-width column type codec table, plus the primitive wire readers it's built on.