execution

package
v0.9.337 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MonitorPollIntervalSeconds int = 10 //nolint:revive,gochecknoglobals // TODO: global vars refactor
)

Functions

func GetMonitorExecutor

func GetMonitorExecutor(
	handlerCtx handler.HandlerContext,
	provider anysdk.Provider,
	op anysdk.OperationStore,
	precursor primitive.IPrimitive,
	initialCtx primitive.IPrimitiveCtx,
	comments sqlparser.CommentDirectives,
	isReturning bool,
	insertCtx drm.PreparedStatementCtx,
	drmCfg drm.Config,
) (primitive.IPrimitive, error)

func NewNilMethodElider

func NewNilMethodElider() methodElider

func NewStandardMethodElider

func NewStandardMethodElider(elisionFunc func(string, ...any) bool) methodElider

Types

type ActionInsertPayload

type ActionInsertPayload interface {
	GetItemisationResult() ItemisationResult
	IsHousekeepingDone() bool
	GetTableName() string
	GetParamsUsed() map[string]interface{}
	GetReqEncoding() string
}

type ActionInsertResult

type ActionInsertResult interface {
	GetError() (error, bool)
	IsHousekeepingDone() bool
}

type AgnosticatePayload

type AgnosticatePayload interface {
	GetArmoury() (anysdk.HTTPArmoury, error)
	GetProvider() anysdk.Provider
	GetMethod() anysdk.OperationStore
	GetTableName() string
	GetAuthContext() *dto.AuthCtx
	GetRuntimeCtx() dto.RuntimeCtx
	GetOutErrFile() io.Writer
	GetMaxResultsElement() sdk_internal_dto.HTTPElement
	GetElider() methodElider
	IsNilResponseAcceptable() bool
	GetPolyHandler() PolyHandler
	GetSelectItemsKey() string
	GetInsertPreparator() InsertPreparator
	IsSkipResponse() bool
	IsMutation() bool
	IsAwait() bool
	GetDefaultHTTPClient() *http.Client // testing purposes only
}

type InsertPreparator

type InsertPreparator interface {
	ActionInsertPreparation(payload ActionInsertPayload) ActionInsertResult
}

type ItemisationResult

type ItemisationResult interface {
	GetItems() (interface{}, bool)
	GetSingltetonResponse() (map[string]interface{}, bool)
	IsOk() bool
	IsNilPayload() bool
}

type MonitorMonoValentExecutorFactory

type MonitorMonoValentExecutorFactory interface {
	GetMonitorExecutor(
		provider anysdk.Provider,
		op anysdk.OperationStore,
		precursor primitive.IPrimitive,
		initialCtx primitive.IPrimitiveCtx,
		comments sqlparser.CommentDirectives,
	) (func(pc primitive.IPrimitiveCtx, bd interface{}) internaldto.ExecutorOutput, error)
}

type MonoValentExecutorFactory

type MonoValentExecutorFactory interface {
	GetExecutor() (func(pc primitive.IPrimitiveCtx) internaldto.ExecutorOutput, error)
}

func NewMonoValentExecutorFactory

func NewMonoValentExecutorFactory(
	graphHolder primitivegraph.PrimitiveGraphHolder,
	handlerCtx handler.HandlerContext,
	tableMeta tablemetadata.ExtendedTableMetadata,
	insertCtx drm.PreparedStatementCtx,
	insertionContainer tableinsertioncontainer.TableInsertionContainer,
	rowSort func(map[string]map[string]interface{}) []string,
	stream streaming.MapStream,
	isSkipResponse bool,
	isMutation bool,
	isAwait bool,
) MonoValentExecutorFactory

type PagingState

type PagingState interface {
	GetPageCount() int
	IsFinished() bool
	GetHTTPResponse() (*http.Response, error)
	GetAPIError() error
}

type PolyHandler

type PolyHandler interface {
	LogHTTPResponseMap(target interface{})
	MessageHandler([]string)
	GetMessages() []string
}

func NewStandardPolyHandler

func NewStandardPolyHandler(handlerCtx handler.HandlerContext) PolyHandler

type Processor

type Processor interface {
	Process() ProcessorResponse
}

func NewProcessor

func NewProcessor(payload ProcessorPayload) Processor

type ProcessorPayload

type ProcessorPayload interface {
	GetArmouryParams() anysdk.HTTPArmouryParameters
	GetElider() methodElider
	GetProvider() anysdk.Provider
	GetMethod() anysdk.OperationStore
	GetTableName() string
	GetRuntimeCtx() dto.RuntimeCtx
	GetAuthCtx() *dto.AuthCtx
	GetOutErrFile() io.Writer
	GetPolyHandler() PolyHandler
	GetSelectItemsKey() string
	GetInsertPreparator() InsertPreparator
	IsSkipResponse() bool
	IsMutation() bool
	IsMaterialiseResponse() bool
	IsAwait() bool
	IsReverseRequired() bool
	GetVerb() string
	GetDefaultHTTPClient() *http.Client // testing purposes only
}

func NewProcessorPayload

func NewProcessorPayload(
	armouryParams anysdk.HTTPArmouryParameters,
	elider methodElider,
	provider anysdk.Provider,
	method anysdk.OperationStore,
	tableName string,
	runtimeCtx dto.RuntimeCtx,
	authCtx *dto.AuthCtx,
	outErrFile io.Writer,
	polyHandler PolyHandler,
	selectItemsKey string,
	insertPreparator InsertPreparator,
	isSkipResponse bool,
	isMaterialiseResponse bool,
	isAwait bool,
	isReverseRequired bool,
	isMutation bool,
	verb string,
	defaultHTTPClient *http.Client,
) ProcessorPayload

type ProcessorResponse

type ProcessorResponse interface {
	GetError() error
	GetSingletonBody() map[string]interface{}
	WithSuccessMessages([]string) ProcessorResponse
	GetSuccessMessages() []string
	AppendReversal(rev anysdk.HTTPPreparator)
	GetReversalStream() anysdk.HttpPreparatorStream
	IsFailed() bool
	GetFailedMessage() string
}

Jump to

Keyboard shortcuts

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