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