data

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectOperator

type CollectOperator string
const (
	List  CollectOperator = "List Operator"
	Sum   CollectOperator = "Sum Operator"
	Min   CollectOperator = "Min Operator"
	Max   CollectOperator = "Max Operator"
	Count CollectOperator = "Count Operator"
)

type DTableStandard

type DTableStandard string
const (
	GRULE  DTableStandard = "GRULE"
	DMN    DTableStandard = "DMN (OMG)"
	DROOLS DTableStandard = "DROOLS (REDHAT)"
)

type DataTyp

type DataTyp string
const (
	String   DataTyp = "string"
	Boolean  DataTyp = "boolean"
	Integer  DataTyp = "integer"
	Float    DataTyp = "float"
	Long     DataTyp = "long"
	Double   DataTyp = "double"
	DateTime DataTyp = "date"
)

type EntryInterface

type EntryInterface interface {
	String() string
	ExpressionLanguage() ExpressionLanguage

	Validate() (bool, []error)
	ValidateDataTypeOfExpression(varType DataTyp) (bool, error)
	ValidateExistenceOfFieldReferencesInExpression(fields []FieldInterface) ([]FieldInterface, []error)

	Convert(listener ast.SFeelListenerInterface)
}

type ExpressionLanguage

type ExpressionLanguage string
const (
	SFEEL      ExpressionLanguage = "sFeel"
	FEEL       ExpressionLanguage = "Feel"
	Javascript ExpressionLanguage = "javascript"
	Python     ExpressionLanguage = "python"
	Groovy     ExpressionLanguage = "groovy"
	JRuby      ExpressionLanguage = "jruby"
	Juel       ExpressionLanguage = "juel"
)

type FieldInterface

type FieldInterface interface {
	Id() string
	DataTyp() DataTyp
	String() string
	GetQualifiedName() string
}

type HitPolicy

type HitPolicy string
const (
	Unique      HitPolicy = "Unique"   // Rules do not overlap. Only a single rule can match.
	First       HitPolicy = "First"    // Rules are evaluated from top to bottom. Rules may overlap, but only the first match counts.
	Priority    HitPolicy = "Priority" // Rule outputs are prioritized. Rules may overlap, but only the match with the highest output priority counts.
	Any         HitPolicy = "Any"      // Multiple matching rules must not make a difference: all matching rules must lead to the same output.
	RuleOrder   HitPolicy = "Rule Order"
	OutputOrder HitPolicy = "Output Order"
	Collect     HitPolicy = "Collect" // The output of all matching rules is aggregated by means of an operator:
)

type Rule

type Rule struct {
	Description   string
	InputEntries  []EntryInterface
	OutputEntries []EntryInterface
}

type Table

type Table struct {
	Key              string
	Name             string
	HitPolicy        HitPolicy
	CollectOperator  CollectOperator
	NotationStandard DTableStandard
	Interferences    bool

	InputFields  []FieldInterface
	OutputFields []FieldInterface
	Rules        []Rule
}

type TestField

type TestField struct {
	Name string
	Key  string
	Typ  DataTyp
}

func (TestField) DataTyp

func (f TestField) DataTyp() DataTyp

func (TestField) GetQualifiedName

func (f TestField) GetQualifiedName() string

func (TestField) Id

func (f TestField) Id() string

func (TestField) String

func (f TestField) String() string

Jump to

Keyboard shortcuts

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