internaldto

package
v0.5.612 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePutativelyUniqueColumnID

func GeneratePutativelyUniqueColumnID(node sqlparser.TableName, colName string) string

Types

type BackendMessages

type BackendMessages interface {
	AppendMessages([]string)
	GetMessages() []string
}

func NewBackendMessages added in v0.5.375

func NewBackendMessages(msgs []string) BackendMessages

type BasicPrimitiveContext

type BasicPrimitiveContext interface {
	GetAuthContext(prov string) (*dto.AuthCtx, error)
	GetErrWriter() io.Writer
	GetWriter() io.Writer
}

func NewBasicPrimitiveContext

func NewBasicPrimitiveContext(
	authCtx func(string) (*dto.AuthCtx, error),
	writer io.Writer,
	errWriter io.Writer,
) BasicPrimitiveContext

type DBTable

type DBTable interface {
	GetBaseName() string
	GetDiscoveryID() int
	GetHeirarchyIdentifiers() HeirarchyIdentifiers
	IsAnalytics() bool
	GetName() string
	GetNameStump() string
}

func NewDBTable

func NewDBTable(name string, nameStump string, baseName string, discoveryID int, hIDs HeirarchyIdentifiers) DBTable

func NewDBTableAnalytics

func NewDBTableAnalytics(name string, discoveryID int, hIDs HeirarchyIdentifiers) DBTable

type ExecPayload

type ExecPayload interface {
	GetHeader() map[string][]string
	GetPayload() []byte
	GetPayloadMap() map[string]interface{}
	SetHeaderKV(k string, v []string)
}

func NewExecPayload

func NewExecPayload(payload []byte, header map[string][]string, payloadMap map[string]interface{}) ExecPayload

type ExecutorOutput

type ExecutorOutput interface {
	GetSQLResult() sqldata.ISQLResultStream
	GetRawResult() IRawResultStream
	GetOutputBody() map[string]interface{}
	GetStream() streaming.MapStream
	SetStream(s streaming.MapStream)
	ResultToMap() (IRawResultStream, error)
	GetError() error
	SetSQLResultFn(f func() sqldata.ISQLResultStream)
	SetRawResultFn(f func() IRawResultStream)
	SetOutputBodyFn(f func() map[string]interface{})
	GetMessages() []string
	AppendMessages(m []string)
	GetUndoLog() (binlog.LogEntry, bool)
	GetRedoLog() (binlog.LogEntry, bool)
	SetUndoLog(binlog.LogEntry)
	SetRedoLog(binlog.LogEntry)
	WithUndoLog(binlog.LogEntry) ExecutorOutput
	WithRedoLog(binlog.LogEntry) ExecutorOutput
}

func NewEmptyExecutorOutput added in v0.5.375

func NewEmptyExecutorOutput() ExecutorOutput

func NewErroneousExecutorOutput

func NewErroneousExecutorOutput(err error) ExecutorOutput

func NewExecutorOutput

func NewExecutorOutput(
	result sqldata.ISQLResultStream,
	body map[string]interface{},
	rawResult map[int]map[int]interface{},
	msg BackendMessages,
	err error,
) ExecutorOutput

func NewNopEmptyExecutorOutput added in v0.5.375

func NewNopEmptyExecutorOutput(messages []string) ExecutorOutput

type Heirarchy

type Heirarchy interface {
	GetServiceHdl() anysdk.Service
	GetResource() anysdk.Resource
	GetMethodSet() anysdk.MethodSet
	GetMethod() anysdk.OperationStore
	SetServiceHdl(anysdk.Service)
	SetResource(anysdk.Resource)
	SetMethodSet(anysdk.MethodSet)
	SetMethod(anysdk.OperationStore)
	SetMethodStr(string)
}

func NewHeirarchy

func NewHeirarchy(hIDs HeirarchyIdentifiers) Heirarchy

type HeirarchyIdentifiers

type HeirarchyIdentifiers interface {
	GetMethodStr() string
	GetProviderStr() string
	GetServiceStr() string
	GetResourceStr() string
	GetResponseSchemaStr() string
	GetSQLDataSourceTableName() string
	GetStackQLTableName() string
	GetTableName() string
	GetSubquery() (SubqueryDTO, bool)
	GetView() (RelationDTO, bool)
	GetSubAST() sqlparser.Statement
	ContainsNativeDBMSTable() bool
	SetContainsNativeDBMSTable(bool)
	SetSubAST(sqlparser.Statement)
	SetMethodStr(string)
	WithView(RelationDTO) HeirarchyIdentifiers

	WithProviderStr(string) HeirarchyIdentifiers
	WithResponseSchemaStr(rss string) HeirarchyIdentifiers
	IsPgInternalObject() bool
	IsPhysicalTable() bool
	SetIsPhysicalTable(isPhysical bool)
	SetIsMaterializedView(isMaterialized bool)
	IsMaterializedView() bool
	// contains filtered or unexported methods
}

func NewHeirarchyIdentifiers

func NewHeirarchyIdentifiers(prov, svc, rsc, method string) HeirarchyIdentifiers

func ObtainSubqueryHeirarchyIdentifiers added in v0.3.293

func ObtainSubqueryHeirarchyIdentifiers(subQuery SubqueryDTO) HeirarchyIdentifiers

func ResolveMethodTerminalHeirarchyIdentifiers

func ResolveMethodTerminalHeirarchyIdentifiers(node sqlparser.TableName) HeirarchyIdentifiers

func ResolveResourceTerminalHeirarchyIdentifiers

func ResolveResourceTerminalHeirarchyIdentifiers(node sqlparser.TableName) HeirarchyIdentifiers

type IRawResultStream

type IRawResultStream interface {
	Read() (RawResult, error)
	IsNil() bool
}

type KeyVal

type KeyVal struct {
	K string
	V []byte
}

type OutputContext

type OutputContext struct {
	RuntimeContext dto.RuntimeCtx
	Result         sqldata.ISQLResultStream
}

type PrepStmt added in v0.5.451

type PrepStmt interface {
	GetRawQuery() string
	GetArgs() []any
}

func NewPrepStmt added in v0.5.451

func NewPrepStmt(
	rawQuery string,
	args []any,
) PrepStmt

type PrepareResultSetDTO

type PrepareResultSetDTO struct {
	OutputBody  map[string]interface{}
	Msg         BackendMessages
	RawRows     map[int]map[int]interface{}
	RowMap      map[string]map[string]interface{}
	ColumnOrder []string
	ColumnOIDs  []oid.Oid
	RowSort     func(map[string]map[string]interface{}) []string
	Err         error
	TypCfg      typing.Config
}

func NewPrepareResultSetDTO

func NewPrepareResultSetDTO(
	body map[string]interface{},
	rowMap map[string]map[string]interface{},
	columnOrder []string,
	rowSort func(map[string]map[string]interface{}) []string,
	err error,
	msg BackendMessages,
	typCfg typing.Config,
) PrepareResultSetDTO

func NewPrepareResultSetPlusRawAndTypesDTO

func NewPrepareResultSetPlusRawAndTypesDTO(
	body map[string]interface{},
	rowMap map[string]map[string]interface{},
	columnOrder []string,
	columnOIDs []oid.Oid,
	rowSort func(map[string]map[string]interface{}) []string,
	err error,
	msg BackendMessages,
	rawRows map[int]map[int]interface{},
	typCfg typing.Config,
) PrepareResultSetDTO

func NewPrepareResultSetPlusRawDTO

func NewPrepareResultSetPlusRawDTO(
	body map[string]interface{},
	rowMap map[string]map[string]interface{},
	columnOrder []string,
	rowSort func(map[string]map[string]interface{}) []string,
	err error,
	msg BackendMessages,
	rawRows map[int]map[int]interface{},
	typCfg typing.Config,
) PrepareResultSetDTO

type RawMap

type RawMap map[int]map[int]interface{}

type RawResult

type RawResult interface {
	GetMap() (RawMap, error)
}

type RelationDTO added in v0.5.451

type RelationDTO interface {
	GetRawQuery() string
	GetName() string
	IsMaterialized() bool
	IsTable() bool
	GetColumns() []typing.RelationalColumn
	SetColumns(columns []typing.RelationalColumn)
}

func NewMaterializedViewDTO added in v0.5.451

func NewMaterializedViewDTO(viewName, rawViewQuery string) RelationDTO

func NewPhysicalTableDTO added in v0.5.451

func NewPhysicalTableDTO(viewName, rawViewQuery string) RelationDTO

func NewViewDTO

func NewViewDTO(viewName, rawViewQuery string) RelationDTO

type RowsDTO

type RowsDTO struct {
	RowMap      map[string]map[string]interface{}
	ColumnOrder []string
	Err         error
	RowSort     func(map[string]map[string]interface{}) []string
}

type SimpleRawResultStream

type SimpleRawResultStream struct {
	// contains filtered or unexported fields
}

func (*SimpleRawResultStream) IsNil

func (sr *SimpleRawResultStream) IsNil() bool

func (*SimpleRawResultStream) Read

func (sr *SimpleRawResultStream) Read() (RawResult, error)

type SubqueryDTO added in v0.3.293

type SubqueryDTO interface {
	GetSubquery() *sqlparser.Subquery
	GetAlias() sqlparser.TableIdent
	GetAliasedTableExpr() *sqlparser.AliasedTableExpr
}

func NewSubqueryDTO added in v0.3.293

func NewSubqueryDTO(aliasedTableExpr *sqlparser.AliasedTableExpr, subQuery *sqlparser.Subquery) SubqueryDTO

type TableParameterCollection

type TableParameterCollection interface {
	GetOptionalParams() suffix.ParameterSuffixMap
	GetRemainingRequiredParams() suffix.ParameterSuffixMap
	GetRequiredParams() suffix.ParameterSuffixMap
}

func NewTableParameterCollection

func NewTableParameterCollection(
	requiredParams, optionalParams,
	remainingRequiredParameters suffix.ParameterSuffixMap,
) TableParameterCollection

type TxnControlCounters

type TxnControlCounters interface {
	GetGenID() int
	GetInsertID() int
	GetSessionID() int
	GetTxnID() int
	SetTableName(string)
	SetTxnID(int)
	Clone() TxnControlCounters
	Copy(TxnControlCounters)
	CloneAndIncrementInsertID() TxnControlCounters
}

func NewTxnControlCounters

func NewTxnControlCounters(txnCtrMgr txncounter.Manager) (TxnControlCounters, error)

func NewTxnControlCountersFromVals

func NewTxnControlCountersFromVals(genID, ssnID, txnID, insertID int) TxnControlCounters

Jump to

Keyboard shortcuts

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