internaldto

package
v0.3.293 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryParam HTTPElementType = iota
	PathParam
	Header
	BodyAttribute
	RequestString
	Error
	QueryParamStr    string = "query"
	PathParamStr     string = "path"
	HeaderStr        string = "header"
	BodyAttributeStr string = "body"
	RequestStringStr string = "request"
)

Variables

This section is empty.

Functions

func GeneratePutativelyUniqueColumnID

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

func GetOidForSchema

func GetOidForSchema(colSchema *openapistackql.Schema) oid.Oid

Types

type BackendMessages

type BackendMessages struct {
	WorkingMessages []string
}

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 ColumnMetadata

type ColumnMetadata interface {
	GetColumnOID() oid.Oid
	GetIdentifier() string
	GetName() string
	GetDecorated() string
	GetRelationalType() string
	GetType() string
}

func NewColDescriptor

func NewColDescriptor(col openapistackql.ColumnDescriptor, relTypeStr string) ColumnMetadata

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 DRMCoupling

type DRMCoupling interface {
	GetRelationalType() string
	GetGolangKind() reflect.Kind
}

func NewDRMCoupling

func NewDRMCoupling(relationalType string, golangKind reflect.Kind) DRMCoupling

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 struct {
	GetSQLResult  func() sqldata.ISQLResultStream
	GetRawResult  func() IRawResultStream
	GetOutputBody func() map[string]interface{}

	Msg *BackendMessages
	Err error
	// contains filtered or unexported fields
}

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 (ExecutorOutput) GetStream

func (ex ExecutorOutput) GetStream() streaming.MapStream

func (ExecutorOutput) ResultToMap

func (ex ExecutorOutput) ResultToMap() (IRawResultStream, error)

func (ExecutorOutput) SetStream

func (ex ExecutorOutput) SetStream(s streaming.MapStream)

type HTTPElement

type HTTPElement interface {
	GetName() string
	GetType() HTTPElementType
	SetTransformer(transformer func(interface{}) (interface{}, error))
	Transformer(interface{}) (interface{}, error)
	IsTransformerPresent() bool
}

func NewHTTPElement

func NewHTTPElement(httpElemType HTTPElementType, name string) HTTPElement

type HTTPElementType

type HTTPElementType int

func ExtractHttpElement

func ExtractHttpElement(s string) (HTTPElementType, error)

type Heirarchy

type Heirarchy interface {
	GetServiceHdl() *openapistackql.Service
	GetResource() *openapistackql.Resource
	GetMethodSet() openapistackql.MethodSet
	GetMethod() *openapistackql.OperationStore
	SetServiceHdl(*openapistackql.Service)
	SetResource(*openapistackql.Resource)
	SetMethodSet(openapistackql.MethodSet)
	SetMethod(*openapistackql.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() (ViewDTO, bool)
	GetSubAST() sqlparser.Statement
	ContainsNativeDBMSTable() bool
	SetContainsNativeDBMSTable(bool)
	SetSubAST(sqlparser.Statement)
	SetMethodStr(string)
	WithView(ViewDTO) HeirarchyIdentifiers

	WithProviderStr(string) HeirarchyIdentifiers
	WithResponseSchemaStr(rss string) HeirarchyIdentifiers
	// 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 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
}

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,
) 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{},
) 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{},
) PrepareResultSetDTO

type RawMap

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

type RawResult

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

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) TxnControlCounters
	CloneAndIncrementInsertID() TxnControlCounters
}

func NewTxnControlCounters

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

func NewTxnControlCountersFromVals

func NewTxnControlCountersFromVals(genId, ssnId, txnId, insertId int) TxnControlCounters

type ViewDTO

type ViewDTO interface {
	GetRawQuery() string
	GetName() string
}

func NewViewDTO

func NewViewDTO(viewName, rawViewQuery string) ViewDTO

Jump to

Keyboard shortcuts

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