ClickHaskell-1.1.0: ClickHouse driver
Safe HaskellNone
LanguageHaskell2010

ClickHaskell.Protocol

Synopsis

Protocol parts

Shared

newtype UVarInt Source #

Unsigned variable-length quantity encoding

Part of protocol implementation

Constructors

MkUVarInt Word64 

Instances

Instances details
NFData UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Methods

rnf :: UVarInt -> () #

Bits UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Bounded UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Enum UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Num UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Integral UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Real UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Show UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Eq UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

Methods

(==) :: UVarInt -> UVarInt -> Bool #

(/=) :: UVarInt -> UVarInt -> Bool #

Ord UVarInt Source # 
Instance details

Defined in ClickHaskell.Primitive

data Revisioned (revisionNumber :: Nat) b a Source #

Protocol implementation part for backward compatilibity formalization

NB:

Be carefull with BeforeRevision value.

If **chosen protocol** revision would be >= **revisionNumber** then you would get an exception during serialization.

To avoid this:

  1. On client side - provide AfterRevision with some empty value
  2. On proxy side - provide server-to-server packets mapping with fallbacks on revision upgrade

Constructors

BeforeRevision b 
AfterRevision a 

Data packet

data DataPacket Source #

Instances

Instances details
Generic DataPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Data

Associated Types

type Rep DataPacket 
Instance details

Defined in ClickHaskell.Protocol.Data

type Rep DataPacket = D1 ('MetaData "DataPacket" "ClickHaskell.Protocol.Data" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkDataPacket" 'PrefixI 'True) ((S1 ('MetaSel ('Just "table_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "block_info") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockInfo)) :*: (S1 ('MetaSel ('Just "columns_count") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt) :*: S1 ('MetaSel ('Just "rows_count") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt))))
type Rep DataPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Data

type Rep DataPacket = D1 ('MetaData "DataPacket" "ClickHaskell.Protocol.Data" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkDataPacket" 'PrefixI 'True) ((S1 ('MetaSel ('Just "table_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "block_info") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockInfo)) :*: (S1 ('MetaSel ('Just "columns_count") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt) :*: S1 ('MetaSel ('Just "rows_count") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt))))

data BlockInfo Source #

Instances

Instances details
Generic BlockInfo Source # 
Instance details

Defined in ClickHaskell.Protocol.Data

Associated Types

type Rep BlockInfo 
Instance details

Defined in ClickHaskell.Protocol.Data

type Rep BlockInfo = D1 ('MetaData "BlockInfo" "ClickHaskell.Protocol.Data" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkBlockInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "field_num1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt) :*: S1 ('MetaSel ('Just "is_overflows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UInt8)) :*: (S1 ('MetaSel ('Just "field_num2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt) :*: (S1 ('MetaSel ('Just "bucket_num") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32) :*: S1 ('MetaSel ('Just "eof") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt)))))
type Rep BlockInfo Source # 
Instance details

Defined in ClickHaskell.Protocol.Data

type Rep BlockInfo = D1 ('MetaData "BlockInfo" "ClickHaskell.Protocol.Data" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkBlockInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "field_num1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt) :*: S1 ('MetaSel ('Just "is_overflows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UInt8)) :*: (S1 ('MetaSel ('Just "field_num2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt) :*: (S1 ('MetaSel ('Just "bucket_num") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32) :*: S1 ('MetaSel ('Just "eof") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt)))))

Client

data ClientPacket where Source #

Instances

Instances details
Generic ClientPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

Associated Types

type Rep ClientPacket 
Instance details

Defined in ClickHaskell.Protocol.Client

type Rep ClientPacket = D1 ('MetaData "ClientPacket" "ClickHaskell.Protocol.Client" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (((C1 ('MetaCons "Hello" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HelloPacket)) :+: (C1 ('MetaCons "Query" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QueryPacket)) :+: C1 ('MetaCons "Data" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataPacket)))) :+: (C1 ('MetaCons "Cancel" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Ping" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TablesStatusRequest" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeepAlive" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Scalar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IgnoredPartUUIDs" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ReadTaskResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MergeTreeReadTaskResponse" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SSHChallengeRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SSHChallengeResponse" 'PrefixI 'False) (U1 :: Type -> Type)))))
type Rep ClientPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

type Rep ClientPacket = D1 ('MetaData "ClientPacket" "ClickHaskell.Protocol.Client" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (((C1 ('MetaCons "Hello" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HelloPacket)) :+: (C1 ('MetaCons "Query" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QueryPacket)) :+: C1 ('MetaCons "Data" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataPacket)))) :+: (C1 ('MetaCons "Cancel" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Ping" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TablesStatusRequest" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeepAlive" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Scalar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IgnoredPartUUIDs" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ReadTaskResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MergeTreeReadTaskResponse" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SSHChallengeRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SSHChallengeResponse" 'PrefixI 'False) (U1 :: Type -> Type)))))

Hello

data HelloPacket Source #

Instances

Instances details
Generic HelloPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

Associated Types

type Rep HelloPacket 
Instance details

Defined in ClickHaskell.Protocol.Client

type Rep HelloPacket = D1 ('MetaData "HelloPacket" "ClickHaskell.Protocol.Client" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkHelloPacket" 'PrefixI 'True) ((S1 ('MetaSel ('Just "client_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: (S1 ('MetaSel ('Just "client_version_major") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt) :*: S1 ('MetaSel ('Just "client_version_minor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt))) :*: ((S1 ('MetaSel ('Just "tcp_protocol_version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ProtocolRevision) :*: S1 ('MetaSel ('Just "default_database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)) :*: (S1 ('MetaSel ('Just "user") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "pass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)))))
type Rep HelloPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

type Rep HelloPacket = D1 ('MetaData "HelloPacket" "ClickHaskell.Protocol.Client" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkHelloPacket" 'PrefixI 'True) ((S1 ('MetaSel ('Just "client_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: (S1 ('MetaSel ('Just "client_version_major") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt) :*: S1 ('MetaSel ('Just "client_version_minor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UVarInt))) :*: ((S1 ('MetaSel ('Just "tcp_protocol_version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ProtocolRevision) :*: S1 ('MetaSel ('Just "default_database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)) :*: (S1 ('MetaSel ('Just "user") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "pass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)))))

data Addendum Source #

Constructors

MkAddendum 

Fields

Instances

Instances details
Generic Addendum Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

Associated Types

type Rep Addendum 
Instance details

Defined in ClickHaskell.Protocol.Client

Methods

from :: Addendum -> Rep Addendum x #

to :: Rep Addendum x -> Addendum #

type Rep Addendum Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

Query

data QueryPacket Source #

Constructors

MkQueryPacket 

Fields

Instances

Instances details
Generic QueryPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

Associated Types

type Rep QueryPacket 
Instance details

Defined in ClickHaskell.Protocol.Client

type Rep QueryPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

data DbSettings Source #

Constructors

MkDbSettings [DbSetting] 

data ClientInfo Source #

Constructors

MkClientInfo 

Fields

Instances

Instances details
Generic ClientInfo Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

Associated Types

type Rep ClientInfo 
Instance details

Defined in ClickHaskell.Protocol.Client

type Rep ClientInfo Source # 
Instance details

Defined in ClickHaskell.Protocol.Client

data Jwt Source #

Constructors

MkJwt ChString 

Server

Hello

data HelloResponse Source #

Constructors

MkHelloResponse 

Fields

Instances

Instances details
Generic HelloResponse Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

Associated Types

type Rep HelloResponse 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep HelloResponse Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

data PasswordComplexityRules Source #

Instances

Instances details
Generic PasswordComplexityRules Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

Associated Types

type Rep PasswordComplexityRules 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep PasswordComplexityRules = D1 ('MetaData "PasswordComplexityRules" "ClickHaskell.Protocol.Server" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkPasswordComplexityRules" 'PrefixI 'True) (S1 ('MetaSel ('Just "original_pattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "exception_message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)))
type Rep PasswordComplexityRules Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep PasswordComplexityRules = D1 ('MetaData "PasswordComplexityRules" "ClickHaskell.Protocol.Server" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkPasswordComplexityRules" 'PrefixI 'True) (S1 ('MetaSel ('Just "original_pattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "exception_message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)))

Exception

data ExceptionPacket Source #

Instances

Instances details
Generic ExceptionPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

Associated Types

type Rep ExceptionPacket 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep ExceptionPacket = D1 ('MetaData "ExceptionPacket" "ClickHaskell.Protocol.Server" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkExceptionPacket" 'PrefixI 'True) ((S1 ('MetaSel ('Just "code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)) :*: (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: (S1 ('MetaSel ('Just "stack_trace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "nested") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UInt8)))))
Show ExceptionPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep ExceptionPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep ExceptionPacket = D1 ('MetaData "ExceptionPacket" "ClickHaskell.Protocol.Server" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkExceptionPacket" 'PrefixI 'True) ((S1 ('MetaSel ('Just "code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)) :*: (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: (S1 ('MetaSel ('Just "stack_trace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "nested") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UInt8)))))

Progress

data ProgressPacket Source #

Constructors

MkProgressPacket 

Fields

Instances

Instances details
Generic ProgressPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

Associated Types

type Rep ProgressPacket 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep ProgressPacket Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

ProfileInfo

data ProfileInfo Source #

Constructors

MkProfileInfo 

Fields

Instances

Instances details
Generic ProfileInfo Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

Associated Types

type Rep ProfileInfo 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep ProfileInfo Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

TableColumns

data TableColumns Source #

Instances

Instances details
Generic TableColumns Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

Associated Types

type Rep TableColumns 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep TableColumns = D1 ('MetaData "TableColumns" "ClickHaskell.Protocol.Server" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkTableColumns" 'PrefixI 'True) (S1 ('MetaSel ('Just "table_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "table_columns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)))
type Rep TableColumns Source # 
Instance details

Defined in ClickHaskell.Protocol.Server

type Rep TableColumns = D1 ('MetaData "TableColumns" "ClickHaskell.Protocol.Server" "ClickHaskell-1.1.0-DCaama8pTWmCtLrW6NrYWU" 'False) (C1 ('MetaCons "MkTableColumns" 'PrefixI 'True) (S1 ('MetaSel ('Just "table_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString) :*: S1 ('MetaSel ('Just "table_columns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChString)))

API

addSetting :: forall (name :: Symbol) settType. KnownSetting name settType => settType -> DbSettings -> DbSettings Source #