common

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GroupAlias = "__group_value"

Variables

This section is empty.

Functions

func ConvertValueToString

func ConvertValueToString(val interface{}) (string, error)

ConvertValueToString convert bigquery compatible types to string

func GenerateFilterExpression

func GenerateFilterExpression(filter string, tableSpec *meta.TableSpec) query.FilterClause

func GenerateGroupExpression

func GenerateGroupExpression(groupName string) query.GroupByClause

func GenerateSelectExpression

func GenerateSelectExpression(groupName string) []*query.SelectExpression

Types

type QueryResultParser

type QueryResultParser struct {
	ParserMap map[metric.Type]RowParserType
}

func (*QueryResultParser) Parse

func (q *QueryResultParser) Parse(row protocol.Row, metricPairs []*SpecExpressionPair) ([]*metric.Metric, error)

type RowParserType

type RowParserType = func(map[string]interface{}, string, *metric.Spec) (*metric.Metric, error)

type SpecExpressionPair

type SpecExpressionPair struct {
	MetricSpec       *metric.Spec
	MetricExpression *query.MetricExpression
}

Jump to

Keyboard shortcuts

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