query

package
v0.0.0-...-23e8124 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatasourceMetadataQuery

type DatasourceMetadataQuery struct {
	QueryType  QueryType              `json:"queryType"`
	DataSource datasource.DataSource  `json:"dataSource"`
	Context    map[string]interface{} `json:"context,omitempty"`
}

type DatasourceMetadataQueryResult

type DatasourceMetadataQueryResult TimeseriesQueryResult

type GroupByQuery

type GroupByQuery struct {
	QueryType        QueryType                        `json:"queryType"`
	DataSource       datasource.DataSource            `json:"dataSource"`
	Dimensions       []dimension.Dimension            `json:"dimensions"`
	LimitSpec        limit.Limit                      `json:"limitSpec,omitempty"`
	Having           having.Having                    `json:"having,omitempty"`
	Granularity      granularity.Granularity          `json:"granularity"`
	Filter           filter.Filter                    `json:"filter,omitempty"`
	Aggregations     []aggregation.Aggregator         `json:"aggregations,omitempty"`
	PostAggregations []postaggregation.PostAggregator `json:"postAggregations,omitempty"`
	Intervals        []string                         `json:"intervals"`
	SubtotalsSpec    [][]string                       `json:"subtotalsSpec,omitempty"`
	Context          map[string]interface{}           `json:"context,omitempty"`
}

func (GroupByQuery) Type

func (g GroupByQuery) Type() string

type GroupByQueryResult

type GroupByQueryResult struct {
	Version   string                 `json:"version"`
	Timestamp string                 `json:"timestamp"`
	Event     map[string]interface{} `json:"event"`
}

type Query

type Query interface {
	Type() string
}

type QueryType

type QueryType int

QueryType for druid query

const (
	TimeSeries QueryType = iota
	TopN
	GroupBy
	Scan
	Search
	TimeBoundary
	SegmentMetadata
	DataSoureMetadata
)

func (QueryType) MarshalJSON

func (q QueryType) MarshalJSON() ([]byte, error)

func (QueryType) Name

func (q QueryType) Name() string

func (QueryType) Ordinal

func (q QueryType) Ordinal() int

func (QueryType) Values

func (q QueryType) Values() *[]string

type ResultFormat

type ResultFormat int
const (
	List ResultFormat = iota
	CompactedList
)

func (ResultFormat) MarshalJSON

func (r ResultFormat) MarshalJSON() ([]byte, error)

func (ResultFormat) Name

func (r ResultFormat) Name() string

func (ResultFormat) Ordinal

func (r ResultFormat) Ordinal() int

func (ResultFormat) Values

func (r ResultFormat) Values() *[]string

type ScanQuery

type ScanQuery struct {
	QueryType    QueryType              `json:"queryType"`
	DataSource   datasource.DataSource  `json:"dataSource"`
	Intervals    []string               `json:"intervals"`
	ResultFormat ResultFormat           `json:"resultFormat"`
	Filter       filter.Filter          `json:"filter,omitempty"`
	Columns      []string               `json:"columns"`
	BatchSize    int64                  `json:"batchSize,omitempty"`
	Limit        int64                  `json:"limit,omitempty"`
	Offset       int64                  `json:"offset,omitempty"`
	Order        sorting.Direction      `json:"order,omitempty"`
	Legacy       bool                   `json:"legacy,omitempty"`
	Context      map[string]interface{} `json:"context,omitempty"`
}

func (ScanQuery) Type

func (s ScanQuery) Type() string

type ScanQueryCompactedResult

type ScanQueryCompactedResult struct {
	SegmentID string     `json:"segmentId"`
	Columns   []string   `json:"columns"`
	Events    [][]string `json:"events"`
}

type ScanQueryResult

type ScanQueryResult struct {
	SegmentID string                   `json:"segmentId"`
	Columns   []string                 `json:"columns"`
	Events    []map[string]interface{} `json:"events"`
}

type SearchQuery

type SearchQuery struct {
	QueryType        QueryType               `json:"queryType"`
	DataSource       datasource.DataSource   `json:"dataSource"`
	Granularity      granularity.Granularity `json:"granularity"`
	Filter           filter.Filter           `json:"filter,omitempty"`
	Limit            int64                   `json:"limit,omitempty"`
	Intervals        []string                `json:"intervals"`
	SearchDimensions []string                `json:"searchDimensions,omitempty"`
	Query            search.Search           `json:"query"`
	Sort             sorting.SortingOrder    `json:"sort,omitempty"`
	Context          map[string]interface{}  `json:"context,omitempty"`
}

type SearchQueryResult

type SearchQueryResult TimeseriesQueryResult

type SegmentMetaDataQuery

type SegmentMetaDataQuery struct {
	QueryType              QueryType              `json:"queryType"`
	DataSource             datasource.DataSource  `json:"dataSource"`
	Intervals              []string               `json:"intervals,omitempty"`
	ToInclude              segment.Include        `json:"toInclude,omitempty"`
	Merge                  bool                   `json:"merge"`
	Context                map[string]interface{} `json:"context,omitempty"`
	AnalysisTypes          []segment.AnalysisType `json:"analysisTypes,omitempty"`
	LenientAggregatorMerge bool                   `json:"lenientAggregatorMerge"`
}

type SegmentMetaDataQueryResult

type SegmentMetaDataQueryResult struct {
	Timestamp        string                 `json:"timestamp"`
	Intervals        []string               `json:"intervals"`
	Columns          map[string]interface{} `json:"columns"` // todo add type for column
	Aggregators      map[string]interface{} `json:"aggregators,omitempty"`
	Cardinality      interface{}            `json:"cardinality,omitempty"`
	Minmax           interface{}            `json:"minmax,omitempty"`
	Size             int64                  `json:"size,omitempty"`
	TimestampSpec    interface{}            `json:"timestampSpec,omitempty"`
	QueryGranularity interface{}            `json:"queryGranularity,omitempty"`
	Rollup           bool                   `json:"rollup,omitempty"`
}

type TimeBoundaryQuery

type TimeBoundaryQuery struct {
	QueryType  QueryType              `json:"queryType"`
	DataSource datasource.DataSource  `json:"dataSource"`
	Bound      common.Bound           `json:"bound,omitempty"`
	Filter     filter.Filter          `json:"filter,omitempty"`
	Context    map[string]interface{} `json:"context,omitempty"`
}

type TimeBoundaryQueryResult

type TimeBoundaryQueryResult TimeseriesQueryResult

type TimeseriesQuery

type TimeseriesQuery struct {
	QueryType        QueryType                        `json:"queryType"`
	DataSource       datasource.DataSource            `json:"dataSource"`
	Descending       bool                             `json:"descending,omitempty"`
	Intervals        []string                         `json:"intervals"`
	Granularity      granularity.Granularity          `json:"granularity"`
	Filter           filter.Filter                    `json:"filter,omitempty"`
	Aggregations     []aggregation.Aggregator         `json:"aggregations,omitempty"`
	PostAggregations []postaggregation.PostAggregator `json:"postAggregations,omitempty"`
	Limit            int64                            `json:"limit,omitempty"`
	Context          map[string]interface{}           `json:"context,omitempty"`
}

func (TimeseriesQuery) Type

func (t TimeseriesQuery) Type() string

type TimeseriesQueryResult

type TimeseriesQueryResult struct {
	Timestamp string                 `json:"timestamp"`
	Result    map[string]interface{} `json:"result"`
}

type TopNQuery

type TopNQuery struct {
	QueryType        QueryType                        `json:"queryType"`
	DataSource       datasource.DataSource            `json:"dataSource"`
	Intervals        []string                         `json:"intervals"`
	Granularity      granularity.Granularity          `json:"granularity"`
	Filter           filter.Filter                    `json:"filter,omitempty"`
	Aggregations     []aggregation.Aggregator         `json:"aggregations,omitempty"`
	PostAggregations []postaggregation.PostAggregator `json:"postAggregations,omitempty"`
	Dimension        dimension.Dimension              `json:"dimension"`
	Threshold        int64                            `json:"threshold"`
	Metric           metric.Metric                    `json:"metric"`
	Context          map[string]interface{}           `json:"context,omitempty"`
}

func (TopNQuery) Type

func (t TopNQuery) Type() string

type TopNQueryResult

type TopNQueryResult TimeseriesQueryResult

Jump to

Keyboard shortcuts

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