datasource

package
v0.0.4-0...-a9841f4 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(data []byte) (builder.DataSource, error)

Types

type Base

type Base struct {
	Typ builder.ComponentType `json:"type,omitempty"`
}

func (*Base) SetType

func (b *Base) SetType(typ builder.ComponentType) *Base

func (*Base) Type

func (b *Base) Type() builder.ComponentType

type GlobalTable

type GlobalTable struct {
	Base
	Name string `json:"name,omitempty"`
}

func NewGlobalTable

func NewGlobalTable() *GlobalTable

func (*GlobalTable) SetName

func (g *GlobalTable) SetName(name string) *GlobalTable

type Inline

type Inline struct {
	Base
	ColumnNames []string   `json:"columnNames,omitempty"`
	ColumnTypes []string   `json:"columnTypes,omitempty"`
	Rows        [][]string `json:"rows,omitempty"`
}

func NewInline

func NewInline() *Inline

func (*Inline) SetColumnNames

func (i *Inline) SetColumnNames(columnNames []string) *Inline

func (*Inline) SetColumnTypes

func (i *Inline) SetColumnTypes(columnTypes []string) *Inline

func (*Inline) SetRows

func (i *Inline) SetRows(rows [][]string) *Inline

type Join

type Join struct {
	Base
	Left        builder.DataSource `json:"left,omitempty"`
	Right       builder.DataSource `json:"right,omitempty"`
	RightPrefix string             `json:"rightPrefix,omitempty"`
	Condition   string             `json:"condition,omitempty"`
	JoinType    types.JoinType     `json:"joinType,omitempty"`
}

func NewJoin

func NewJoin() *Join

func (*Join) SetCondition

func (j *Join) SetCondition(condition string) *Join

func (*Join) SetJoinType

func (j *Join) SetJoinType(joinType types.JoinType) *Join

func (*Join) SetLeft

func (j *Join) SetLeft(left builder.DataSource) *Join

func (*Join) SetRight

func (j *Join) SetRight(right builder.DataSource) *Join

func (*Join) SetRightPrefix

func (j *Join) SetRightPrefix(rightPrefix string) *Join

func (*Join) UnmarshalJSON

func (j *Join) UnmarshalJSON(data []byte) error

type Lookup

type Lookup struct {
	Base
	Lookup string `json:"lookup,omitempty"`
}

func NewLookup

func NewLookup() *Lookup

func (*Lookup) SetLookup

func (l *Lookup) SetLookup(lookup string) *Lookup

type Query

type Query struct {
	Base
	Query builder.Query `json:"-,omitempty"`
}

func NewQuery

func NewQuery() *Query

func (*Query) SetQuery

func (q *Query) SetQuery(qry builder.Query)

func (*Query) UnmarshalJSONWithQueryLoader

func (q *Query) UnmarshalJSONWithQueryLoader(data []byte, loader func(data []byte) (builder.Query, error)) error

type Table

type Table struct {
	Base
	Name string `json:"name,omitempty"`
}

func NewTable

func NewTable() *Table

func (*Table) SetName

func (t *Table) SetName(name string) *Table

type Union

type Union struct {
	Base
	DataSources []string `json:"dataSources,omitempty"`
}

func NewUnion

func NewUnion() *Union

func (*Union) SetDataSources

func (u *Union) SetDataSources(dataSources []string) *Union

Jump to

Keyboard shortcuts

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