macros

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNoArgumentsToMacro           = errors.New("expected minimum of 1 argument. But no argument found")
	ErrorInsufficientArgumentsToMacro = errors.New("expected number of arguments not matching")
)

Functions

func DateFilter

func DateFilter(query *sqlds.Query, args []string) (string, error)

func FromTimeFilter

func FromTimeFilter(query *sqlds.Query, args []string) (string, error)

FromTimeFilter return time filter query based on grafana's timepicker's from time

func IsValidComparisonPredicates

func IsValidComparisonPredicates(comparison_predicates string) bool

IsValidComparisonPredicates checks for a string and return true if it is a valid SQL comparison predicate

func RemoveQuotesInArgs

func RemoveQuotesInArgs(args []string) []string

RemoveQuotesInArgs remove all quotes from macro arguments and return

func TimeFilter

func TimeFilter(query *sqlds.Query, args []string) (string, error)

func ToTimeFilter

func ToTimeFilter(query *sqlds.Query, args []string) (string, error)

ToTimeFilter return time filter query based on grafana's timepicker's to time

Types

This section is empty.

Jump to

Keyboard shortcuts

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