deps

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeTable is a table node
	TypeTable = "table"
	// TypeModel is a TypeModel
	TypeModel = "model"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Statement

type Statement struct {
	Statement string
	// index of the statement in the SQL program
	Order int
	// Statement's input/output must be a table.
	Inputs  []*Table
	Outputs []*Table
}

Statement represents a graph node of one statement.

func Analyze

func Analyze(parsedProgram []*parser.SQLFlowStmt) ([]*Statement, error)

Analyze will construct a dependency graph for the SQL program and returns a list of statements with inputs, outputs connections.

type Table

type Table struct {
	// Type can be "table" or "model".
	Type        TableType
	Name        string
	HazardIndex int
}

Table represents a graph node of one database table.

func (*Table) FullName

func (t *Table) FullName() string

FullName of the table node.

type TableType

type TableType string

TableType can be table or model

Jump to

Keyboard shortcuts

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