clickhousegw

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickHouseGateway

type ClickHouseGateway struct {
	// contains filtered or unexported fields
}

ClickHouseGateway is a wrapper for Clickhouse

func New

New instantiates a new ClickHouseGateway

func (*ClickHouseGateway) Close

func (c *ClickHouseGateway) Close()

Close closes the database handler

func (*ClickHouseGateway) DescribeDict

func (c *ClickHouseGateway) DescribeDict(dictName string) ([]string, error)

DescribeDict gets the names of all fields in a dictionary

func (*ClickHouseGateway) DescribeTable

func (c *ClickHouseGateway) DescribeTable(tableName string) ([]string, error)

DescribeTable gets the names of all fields of a table

func (*ClickHouseGateway) GetColumnValues

func (c *ClickHouseGateway) GetColumnValues(columnName string) ([]string, error)

GetColumnValues gets all unique values of a column

func (*ClickHouseGateway) GetDatabaseName

func (c *ClickHouseGateway) GetDatabaseName() string

GetDatabaseName gets the databases name

func (*ClickHouseGateway) GetDictValues

func (c *ClickHouseGateway) GetDictValues(dictName string, attr string) ([]string, error)

GetDictValues gets all values of a certain dicts attribute

func (*ClickHouseGateway) InsertFlows

func (c *ClickHouseGateway) InsertFlows(flows []*flow.Flow) error

InsertFlows inserts flows into clickhouse

func (*ClickHouseGateway) Query

func (c *ClickHouseGateway) Query(q string) (*sql.Rows, error)

Query executs an SQL query

type ClickhouseConfig

type ClickhouseConfig struct {
	Host     string `yaml:"host"`
	Address  string `yaml:"address"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

ClickhouseConfig represents a clickhouse client config

Jump to

Keyboard shortcuts

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