readers

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"
)
View Source
const (

	// MaxKeyValues is the maximum number of key-value pairs in one JSON messages query.
	MaxKeyValues = 10
)

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