readers

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONTable  = "json"
	JSONOrder  = "created"
	SenMLTable = "senml"
	SenMLOrder = "time"

	// EqualKey represents the equal comparison operator key.
	EqualKey = "eq"
	// LowerThanKey represents the lower-than comparison operator key.
	LowerThanKey = "lt"
	// LowerThanEqualKey represents the lower-than-or-equal comparison operator key.
	LowerThanEqualKey = "le"
	// GreaterThanKey represents the greater-than-or-equal comparison operator key.
	GreaterThanKey = "gt"
	// GreaterThanEqualKey represents the greater-than-or-equal comparison operator key.
	GreaterThanEqualKey = "ge"
	// StartsWithKey represents the case-insensitive starts-with comparison operator key.
	StartsWithKey = "starts_with"
	// ContainsKey represents the case-insensitive contains comparison operator key.
	ContainsKey = "contains"

	// MicrosecondInterval represents the microsecond aggregation interval unit.
	MicrosecondInterval = "microsecond"
	// MillisecondInterval represents the millisecond aggregation interval unit.
	MillisecondInterval = "millisecond"
	// SecondInterval represents the second aggregation interval unit.
	SecondInterval = "second"
	// MinuteInterval represents the minute aggregation interval unit.
	MinuteInterval = "minute"
	// HourInterval represents the hour aggregation interval unit.
	HourInterval = "hour"
	// DayInterval represents the day aggregation interval unit.
	DayInterval = "day"
	// WeekInterval represents the week aggregation interval unit.
	WeekInterval = "week"
	// MonthInterval represents the month aggregation interval unit.
	MonthInterval = "month"
	// YearInterval represents the year aggregation interval unit.
	YearInterval = "year"
)

Variables

View Source
var (
	// ErrInvalidKey indicates a malformed JSON payload key.
	ErrInvalidKey = errors.New("invalid key")
)

Functions

func BaseConditions

func BaseConditions(pm domain.MessagesPageMetadata, timeColumn string) []string

func BaseQueryParams

func BaseQueryParams(pm domain.MessagesPageMetadata) map[string]any

func ComparatorSymbol

func ComparatorSymbol(key string) string

ComparatorSymbol converts a comparison operator key into its SQL symbol.

func JSONConditions added in v0.44.0

func JSONConditions(pm domain.JSONPageMetadata) []string

JSONConditions returns the SQL predicates common to every json read.

func JSONQueryParams added in v0.44.0

func JSONQueryParams(pm domain.JSONPageMetadata) map[string]any

JSONQueryParams returns the named parameters referenced by JSONConditions.

func ParseKey added in v0.44.0

func ParseKey(key string) (string, error)

ParseKey converts a dot-separated JSON payload key into a strict JSON path. Arrays are only entered through an index: [n] for one item or [*] for any item.

func SenMLConditions

func SenMLConditions(pm domain.SenMLPageMetadata) []string

senmlConditions returns the SQL predicates common to every senml read, including the aggregated ones.

Types

This section is empty.

Jump to

Keyboard shortcuts

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