Documentation ¶
Index ¶
- Variables
- func HandleError(w http.ResponseWriter, err error) (status int, queueFail bool)
- func NewErrWithDescr(err string, data string) error
- func Post(ctx context.Context, dsn string, query string, postBody io.Reader, ...) ([]byte, int64, int64, error)
- func PostGzip(ctx context.Context, dsn string, query string, postBody io.Reader, ...) ([]byte, int64, int64, error)deprecated
- func PostWithEncoding(ctx context.Context, dsn string, query string, postBody io.Reader, ...) ([]byte, int64, int64, error)
- func Query(ctx context.Context, dsn string, query string, opts Options, ...) ([]byte, int64, int64, error)
- func ReadUvarint(array []byte) (uint64, int, error)
- type Column
- type ContentEncoding
- type ErrWithDescr
- type ExternalData
- type ExternalTable
- type LoggedReader
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClickHouseResponse = errors.New("Malformed response from clickhouse")
View Source
var ErrInvalidTimeRange = errors.New("Invalid or empty time range")
View Source
var ErrUvarintOverflow = errors.New("ReadUvarint: varint overflows a 64-bit integer")
View Source
var ErrUvarintRead = errors.New("ReadUvarint: Malformed array")
Functions ¶
func HandleError ¶ added in v0.11.6
func HandleError(w http.ResponseWriter, err error) (status int, queueFail bool)
func NewErrWithDescr ¶ added in v0.13.4
func PostWithEncoding ¶ added in v0.14.0
Types ¶
type ContentEncoding ¶ added in v0.14.0
type ContentEncoding string
const ( ContentEncodingNone ContentEncoding = "none" ContentEncodingGzip ContentEncoding = "gzip" ContentEncodingZstd ContentEncoding = "zstd" )
type ErrWithDescr ¶ added in v0.13.4
type ErrWithDescr struct {
// contains filtered or unexported fields
}
func (*ErrWithDescr) Error ¶ added in v0.13.4
func (e *ErrWithDescr) Error() string
func (*ErrWithDescr) PrependDescription ¶ added in v0.13.4
func (e *ErrWithDescr) PrependDescription(test string)
type ExternalData ¶ added in v0.13.0
type ExternalData struct { Tables []ExternalTable // contains filtered or unexported fields }
ExternalData is a type to use ClickHouse external data feature. You could use it to pass multiple temporary tables for a query.
func NewExternalData ¶ added in v0.13.0
func NewExternalData(tables ...ExternalTable) *ExternalData
NewExternalData returns the `*ExternalData` object for `tables`
type ExternalTable ¶ added in v0.13.0
type ExternalTable struct { // Table name Name string Columns []Column // ClickHouse input/output format Format string Data []byte }
ExternalTable is a structure to use ClickHouse feature that creates a temporary table for a query
type LoggedReader ¶ added in v0.13.4
type LoggedReader struct {
// contains filtered or unexported fields
}
func Reader ¶ added in v0.6.2
func Reader(ctx context.Context, dsn string, query string, opts Options, extData *ExternalData) (*LoggedReader, error)
func (*LoggedReader) ChReadBytes ¶ added in v0.13.4
func (r *LoggedReader) ChReadBytes() int64
func (*LoggedReader) ChReadRows ¶ added in v0.13.4
func (r *LoggedReader) ChReadRows() int64
func (*LoggedReader) Close ¶ added in v0.13.4
func (r *LoggedReader) Close() error
Click to show internal directories.
Click to hide internal directories.