clickhouse

package
v0.0.0-...-6bc7ae6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClickHouse

func NewClickHouse(ctx context.Context,
	connection driver.Conn) *clickHouse

func TestSQLBuilderExecutionColumnMapping

func TestSQLBuilderExecutionColumnMapping(t *testing.T)

func TestSQLBuilderExecutionColumnOverageMapping

func TestSQLBuilderExecutionColumnOverageMapping(t *testing.T)

Types

type SQLBuilder

type SQLBuilder interface {
	MetricName(name string) SQLBuilder
	GetMetricName() string
	Select(columns ...string) SQLBuilder
	From(table string) SQLBuilder
	Where(condition ...string) SQLBuilder
	Range(start, end time.Time) SQLBuilder
	Group(groups ...string) SQLBuilder
	Interval(interval int) SQLBuilder
	Build() (string, error)
	ValidateBuilder() error
}

SQLBuilder is the interface for building SQL statements.

func NewGaugeMetricSQLBuilder

func NewGaugeMetricSQLBuilder() SQLBuilder

func NewSumMetricSQLBuilder

func NewSumMetricSQLBuilder() SQLBuilder

type SelectResult

type SelectResult struct {
	Attr1     string
	Attr2     string
	Attr3     string
	Attr4     string
	Attr5     string
	UsageTime time.Time
	Usage     float64
}

type SelectResultGrouped

type SelectResultGrouped struct {
	Attr1     string
	UsageTime time.Time
	Usage     float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL