modifiers

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadGlobalModifier

func LoadGlobalModifier(key string) (ksqlmodifiers.AttrModifier, error)

LoadGlobalModifier is used internally by KSQL to load modifiers during runtime.

func RegisterAttrModifier

func RegisterAttrModifier(key string, modifier ksqlmodifiers.AttrModifier)

RegisterAttrModifier allow users to add custom modifiers on startup it is recommended to do this inside an init() function.

Types

type AttrScanWrapper

type AttrScanWrapper struct {
	Ctx context.Context

	AttrPtr interface{}

	ScanFn ksqlmodifiers.AttrScanner
	OpInfo ksqlmodifiers.OpInfo
}

AttrScanWrapper is the wrapper that allow us to intercept the Scan process so we can run the modifiers instead of allowing the database driver to use its default behavior.

For that this struct implements the `sql.Scanner` interface

func (AttrScanWrapper) Scan

func (a AttrScanWrapper) Scan(dbValue interface{}) error

Scan implements the sql.Scanner interface

type AttrValueWrapper

type AttrValueWrapper struct {
	Ctx context.Context

	Attr interface{}

	ValueFn ksqlmodifiers.AttrValuer
	OpInfo  ksqlmodifiers.OpInfo
}

AttrValueWrapper is the wrapper that allow us to intercept the "Valuing" process so we can run the modifiers instead of allowing the database driver to use its default behavior.

For that this struct implements the `sql.Valuer` interface

func (AttrValueWrapper) Value

func (a AttrValueWrapper) Value() (driver.Value, error)

Value implements the sql.Valuer interface

Jump to

Keyboard shortcuts

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