taxonomy

package
v0.5.643 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAliasFromStatement

func GetAliasFromStatement(node sqlparser.SQLNode) string

func GetHeirarchyFromStatement

func GetHeirarchyFromStatement(
	handlerCtx handler.HandlerContext,
	node sqlparser.SQLNode,
	parameters parserutil.ColumnKeyedDatastore,
) (tablemetadata.HeirarchyObjects, error)

Hierarchy inference function. Returns:

  • Hierarchy
  • Supplied parameters that are **not** consumed in Hierarchy inference
  • Error if applicable.

func GetHeirarchyIDsFromParserNode

func GetHeirarchyIDsFromParserNode(
	handlerCtx handler.HandlerContext,
	node sqlparser.SQLNode,
) (internaldto.HeirarchyIdentifiers, error)

func GetTableNameFromStatement

func GetTableNameFromStatement(node sqlparser.SQLNode, formatter sqlparser.NodeFormatter) string

Types

type AnnotatedTabulationMap

type AnnotatedTabulationMap map[sqlparser.SQLNode]util.AnnotatedTabulation

type AnnotationCtx

type AnnotationCtx interface {
	GetHIDs() internaldto.HeirarchyIdentifiers
	IsDynamic() bool
	GetView() (internaldto.RelationDTO, bool)
	GetSubquery() (internaldto.SubqueryDTO, bool)
	GetInputTableName() (string, error)
	GetParameters() map[string]interface{}
	GetSchema() anysdk.Schema
	GetTableMeta() tablemetadata.ExtendedTableMetadata
	Prepare(handlerCtx handler.HandlerContext, inStream streaming.MapStream) error
	SetDynamic()
	Clone() AnnotationCtx
}

TODO:

  • For views, need API to get child.

func NewStaticStandardAnnotationCtx

func NewStaticStandardAnnotationCtx(
	schema anysdk.Schema,
	hIds internaldto.HeirarchyIdentifiers,
	tableMeta tablemetadata.ExtendedTableMetadata,
	parameters map[string]interface{},
) AnnotationCtx

type AnnotationCtxMap

type AnnotationCtxMap map[sqlparser.SQLNode]AnnotationCtx

func (AnnotationCtxMap) AssignParams

func (am AnnotationCtxMap) AssignParams() error

func (AnnotationCtxMap) GetStringParams

func (am AnnotationCtxMap) GetStringParams() map[string]interface{}

type TblMap

func (TblMap) GetTable

func (TblMap) GetTableLoose

func (TblMap) SetTable

func (tm TblMap) SetTable(node sqlparser.SQLNode, table tablemetadata.ExtendedTableMetadata)

Jump to

Keyboard shortcuts

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