clickhouse

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuery

func NewQuery(mods ...qm.QueryMod) (string, []any)

NewQuery initializes a new Query using the passed in QueryMods.

Types

type Service

type Service struct {
	ChConn clickhouse.Conn
}

Service is responsible for handling ClickHouse database operations.

func New

func New(settings config.Settings) (*Service, error)

New creates a new ClickHouse service using the provided settings.

func (*Service) InsertIntoClickhouse

func (s *Service) InsertIntoClickhouse(ctx context.Context, signals []vss.Signal) error

InsertIntoClickhouse inserts the values into the clickhouse database

func (*Service) QueryOldestSignal

func (s *Service) QueryOldestSignal(ctx context.Context, tokenID uint32, signalNames []string) (*vss.Signal, error)

QueryOldestSignal returns the oldest signal from the ClickHouse database with the given tokenID and signal names. if signalNames is empty, it returns the earliest signal for the given tokenID.

func (*Service) QueryTokenIDs

func (s *Service) QueryTokenIDs(ctx context.Context) ([]uint32, error)

Jump to

Keyboard shortcuts

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