clickhouse-haskell-0.1.2.0: A Haskell library as database client for Clickhouse
Safe HaskellNone
LanguageHaskell2010

Database.ClickHouseDriver.IO.BufferedReader

Description

Tools to analyze protocol and deserialize data sent from server. This module is for internal use only.

Synopsis

Documentation

readVarInt' Source #

Arguments

:: Buffer

buffer to be read

-> IO (Word, Buffer)

(the word read from buffer, the buffer after reading)

readBinaryStr' Source #

Arguments

:: Buffer

Buffer to be read

-> IO (ByteString, Buffer)

(the string read from Buffer, the buffer after reading)

read binary string from buffer. It first read the integer(n) in front of the desired string, then it read n bytes to capture the whole string.

data Buffer Source #

Buffer is for receiving data from TCP stream. Whenever all bytes are read, it automatically refill from the stream.

Constructors

Buffer 

createBuffer :: Int -> Socket -> IO Buffer Source #

create buffer with size and socket.

refill :: Buffer -> IO Buffer Source #

refill buffer from stream