querybuilder

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeName

func EscapeName(s string) string

Types

type Config

type Config struct {
	FeaturesTable string

	// EscapeName is used to escape the feature's FQN.
	EscapeName func(s string) string
	// SubtractDuration is used to subtract a duration from a field with your SQL flavor.
	SubtractDuration func(d time.Duration, field string) string
	// CastFeature is used to cast a feature to a specific type for your SQL flavor.
	CastFeature func(ft api.FeatureDescriptor) string
	// TmpName is used to generate a temporary table name.
	TmpName func(s string) string
}

type QueryBuilder

type QueryBuilder interface {
	FeatureSet(ctx context.Context, fs manifests.ModelSpec, getter api.FeatureDescriptorGetter) (query string, err error)
	Feature(feature api.FeatureDescriptor) (string, error)
}

func New

func New(config Config) QueryBuilder

Jump to

Keyboard shortcuts

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