graph

package
v1.14.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpIO = map[string][]*IOType{
	"aggfunc": {
		{Type: IOINPUT_TYPE_COLLECTION, RowType: IOROW_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_ANY},
		{Type: IOINPUT_TYPE_COLLECTION, CollectionType: IOCOLLECTION_TYPE_GROUPED},
	},
	"filter": {
		{Type: IOINPUT_TYPE_ANY, RowType: IOROW_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_ANY},
		{Type: IOINPUT_TYPE_SAME},
	},
	"function": {
		{Type: IOINPUT_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_SINGLE, RowType: IOROW_TYPE_ANY},
		{Type: IOINPUT_TYPE_SAME},
	},
	"groupby": {
		{Type: IOINPUT_TYPE_COLLECTION, CollectionType: IOCOLLECTION_TYPE_SINGLE, RowType: IOROW_TYPE_ANY},
		{Type: IOINPUT_TYPE_COLLECTION, CollectionType: IOCOLLECTION_TYPE_GROUPED},
	},
	"join": {
		{Type: IOINPUT_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_SINGLE, RowType: IOROW_TYPE_SINGLE, AllowMulti: true},
		{Type: IOINPUT_TYPE_COLLECTION, CollectionType: IOCOLLECTION_TYPE_SINGLE, RowType: IOROW_TYPE_MERGED},
	},
	"orderby": {
		{Type: IOINPUT_TYPE_COLLECTION, RowType: IOROW_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_ANY},
		{Type: IOINPUT_TYPE_SAME},
	},
	"pick": {
		{Type: IOINPUT_TYPE_ANY, RowType: IOROW_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_ANY},
		{Type: IOINPUT_TYPE_SAME},
	},
	"watermark": {
		{Type: IOINPUT_TYPE_ROW, RowType: IOROW_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_ANY, AllowMulti: true},
		{Type: IOINPUT_TYPE_SAME},
	},
	"window": {
		{Type: IOINPUT_TYPE_ROW, RowType: IOROW_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_ANY, AllowMulti: true},
		{Type: IOINPUT_TYPE_COLLECTION, CollectionType: IOCOLLECTION_TYPE_SINGLE, RowType: IOROW_TYPE_SINGLE},
	},
	"switch": {
		{Type: IOINPUT_TYPE_ANY, RowType: IOROW_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_ANY},
		{Type: IOINPUT_TYPE_SAME},
	},
	"script": {
		{Type: IOINPUT_TYPE_ANY, RowType: IOROW_TYPE_ANY, CollectionType: IOCOLLECTION_TYPE_ANY},
		{Type: IOINPUT_TYPE_SAME},
	},
}

OpIO The io constraints for a node

Functions

func Fit

func Fit(value, condition *IOType) (bool, error)

Types

type Filter

type Filter struct {
	Expr string `json:"expr"`
}

type Function

type Function struct {
	Expr string `json:"expr"`
}

type Groupby

type Groupby struct {
	Dimensions []string `json:"dimensions"`
}

type IOType

type IOType struct {
	Type           IoInputType      `json:"type"`
	RowType        IoRowType        `json:"rowType"`
	CollectionType IoCollectionType `json:"collectionType"`
	AllowMulti     bool             `json:"allowMulti"`
}

IOType is the type of input/output all fields are default to any

func MapOut

func MapOut(previous, origin *IOType) (result *IOType)

func NewIOType

func NewIOType() *IOType

NewIOType creates a new IOType

type IoCollectionType

type IoCollectionType uint8
const (
	IOCOLLECTION_TYPE_SAME IoCollectionType = iota
	IOCOLLECTION_TYPE_SINGLE
	IOCOLLECTION_TYPE_GROUPED
	IOCOLLECTION_TYPE_ANY
)

type IoInputType

type IoInputType uint8
const (
	IOINPUT_TYPE_SAME       IoInputType = iota
	IOINPUT_TYPE_ROW                    // 0b01
	IOINPUT_TYPE_COLLECTION             // 0b10
	IOINPUT_TYPE_ANY                    // 0b11
)

type IoRowType

type IoRowType uint8
const (
	IOROW_TYPE_SAME   IoRowType = iota
	IOROW_TYPE_SINGLE           // 0b01
	IOROW_TYPE_MERGED           // 0b10
	IOROW_TYPE_ANY              // 0b11
)

type Join

type Join struct {
	From  string `json:"from"`
	Joins []struct {
		Name string `json:"name"`
		Type string `json:"type"`
		On   string `json:"on"`
	}
}

type Orderby

type Orderby struct {
	Sorts []struct {
		Field string `json:"field"`
		Desc  bool   `json:"desc"`
	}
}

type Script

type Script struct {
	Script string `json:"script"`
	IsAgg  bool   `json:"isAgg"`
}

type Select

type Select struct {
	Fields []string `json:"fields"`
	IsAgg  bool     `json:"isAgg"`
}

type Switch

type Switch struct {
	Cases            []string `json:"cases"`
	StopAtFirstMatch bool     `json:"stopAtFirstMatch"`
}

type Watermark

type Watermark struct {
	Emitters      []string `json:"emitters"`
	SendWatermark bool     `json:"sendWatermark"`
}

type Window

type Window struct {
	Type     string `json:"type"`
	Unit     string `json:"unit"`
	Size     int    `json:"size"`
	Interval int    `json:"interval"`
}

Jump to

Keyboard shortcuts

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