router

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParameterRouter

type ParameterRouter interface {

	// First pass assignment of columnar objects
	// to tables, only for HTTP method parameters.  All data accrual is done herein:
	//   - SQL parser table objects mapped to hierarchy.
	//   - Data flow dependencies identified and persisted.
	//   - Hierarchies may be persisted for analysis.
	// Detects bi-directional data flow errors and returns error if so.
	// Returns:
	//   - Hierarchy.
	//   - Columnar objects definitely assigned as HTTP method parameters.
	//   - Error if applicable.
	Route(tb sqlparser.TableExpr, handler handler.HandlerContext) (taxonomy.AnnotationCtx, error)

	// Detects:
	//   - Dependency cycle.
	AnalyzeDependencies() error

	GetOnConditionsToRewrite() map[*sqlparser.ComparisonExpr]struct{}

	GetOnConditionDataFlows() (dataflow.Collection, error)
}

Parameter router supports mapping columnar input to tabular output. This is for dealing with parser objects, prior to assignment of openapi schemas. The storage medium for constituents is abstracted. As of now this is a multi stage object, violates Single functionality.

func NewParameterRouter

func NewParameterRouter(
	annotatedAST annotatedast.AnnotatedAst,
	tablesAliasMap parserutil.TableAliasMap,
	tableMap parserutil.TableExprMap,
	whereParamMap parserutil.ParameterMap,
	onParamMap parserutil.ParameterMap,
	colRefs parserutil.ColTableMap,
	namespaceCollection tablenamespace.Collection,
	astFormatter sqlparser.NodeFormatter,
) ParameterRouter

type TableRouteAstVisitor

type TableRouteAstVisitor interface {
	GetAnnotations() taxonomy.AnnotationCtxMap
	GetParameterRouter() ParameterRouter
	GetTableMap() taxonomy.TblMap
	Visit(node sqlparser.SQLNode) error
	IsPgInternalOnly() bool
}

func NewTableRouteAstVisitor

func NewTableRouteAstVisitor(handlerCtx handler.HandlerContext, router ParameterRouter) TableRouteAstVisitor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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