Help us shape the future of Go! Take the 2026 Go Developer Survey

drm

package
v0.5.635 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.5.375

type Config interface {
	ColumnsToRelationalColumns(cols []typing.ColumnMetadata) []typing.RelationalColumn
	ColumnToRelationalColumn(cols typing.ColumnMetadata) typing.RelationalColumn
	ExtractFromGolangValue(interface{}) interface{}
	ExtractObjectFromSQLRows(
		r *sql.Rows,
		nonControlColumns []typing.ColumnMetadata,
		stream streaming.MapStream,
	) (map[string]map[string]interface{}, map[int]map[int]interface{})
	GetCurrentTable(internaldto.HeirarchyIdentifiers) (internaldto.DBTable, error)
	GetRelationalType(string) string
	GenerateDDL(util.AnnotatedTabulation, anysdk.OperationStore, int, bool) ([]string, error)
	GetControlAttributes() sqlcontrol.ControlAttributes
	GetGolangValue(string) interface{}
	GetGolangSlices([]typing.ColumnMetadata) ([]interface{}, []string)
	GetNamespaceCollection() tablenamespace.Collection
	GetParserTableName(internaldto.HeirarchyIdentifiers, int) sqlparser.TableName
	GetSQLSystem() sql_system.SQLSystem
	GetTable(internaldto.HeirarchyIdentifiers, int) (internaldto.DBTable, error)
	GenerateInsertDML(
		util.AnnotatedTabulation,
		anysdk.OperationStore,
		internaldto.TxnControlCounters,
	) (PreparedStatementCtx, error)
	GenerateSelectDML(
		util.AnnotatedTabulation,
		internaldto.TxnControlCounters,
		string,
		string,
	) (PreparedStatementCtx, error)
	ExecuteInsertDML(sqlengine.SQLEngine, PreparedStatementCtx, map[string]interface{}, string) (sql.Result, error)
	OpenapiColumnsToRelationalColumns(cols []anysdk.ColumnDescriptor) []typing.RelationalColumn
	OpenapiColumnsToRelationalColumn(col anysdk.ColumnDescriptor) typing.RelationalColumn
	QueryDML(sqlmachinery.Querier, PreparedStatementParameterized) (*sql.Rows, error)
	ExecDDL(
		querier sqlmachinery.ExecQuerier,
		ctxParameterized PreparedStatementParameterized,
	) (sql.Result, error)
	CreateMaterializedView(
		relationName string,
		rawDDL string,
		ctxParameterized PreparedStatementParameterized,
		replaceAllowed bool,
	) error
	RefreshMaterializedView(
		relationName string,
		ctxParameterized PreparedStatementParameterized,
	) error
	// This one the DDL is ahead of time so table name already aware; it is the exception
	CreatePhysicalTable(
		fullyQualifiedRelationName string,
		rawDDL string,
		tableSpec *sqlparser.TableSpec,
		ifNotExists bool,
	) error
	InsertIntoPhysicalTable(
		relationName string,
		insertColumnsString string,
		ctxParameterized PreparedStatementParameterized,
	) error
	GetFullyQualifiedRelationName(string) string
	DelimitFullyQualifiedRelationName(string) string
}

func GetDRMConfig

func GetDRMConfig(
	sqlSystem sql_system.SQLSystem,
	typCfg typing.Config,
	namespaceCollection tablenamespace.Collection,
	controlAttributes sqlcontrol.ControlAttributes,
) (Config, error)

type PreparedStatementArgs

type PreparedStatementArgs interface {
	Analyze() error

	GetArgs() []interface{}
	GetChild(int) PreparedStatementArgs
	GetChildren() map[int]PreparedStatementArgs
	GetExpandedArgs() []interface{}
	GetExpandedQuery() string
	GetQuery() string
	SetArgs([]interface{})
	SetChild(int, PreparedStatementArgs)
	// contains filtered or unexported methods
}

func NewPreparedStatementArgs

func NewPreparedStatementArgs(query string) PreparedStatementArgs

type PreparedStatementCtx

type PreparedStatementCtx interface {
	GetAllCtrlCtrs() []internaldto.TxnControlCounters
	GetGCCtrlCtrs() internaldto.TxnControlCounters
	GetIndirectContexts() []PreparedStatementCtx
	GetCtrlColumnRepeats() int
	GetNonControlColumns() []typing.ColumnMetadata
	GetGCHousekeepingQueries() string
	GetQuery() string
	SetGCCtrlCtrs(tcc internaldto.TxnControlCounters)
	SetIndirectContexts(indirectContexts []PreparedStatementCtx)
	SetKind(kind string)
	UpdateQuery(q string)
}

func NewPreparedStatementCtx

func NewPreparedStatementCtx(
	query string,
	kind string,
	genIDControlColName string,
	sessionIDControlColName string,
	tableNames []string,
	txnIDControlColName string,
	insIDControlColName string,
	insEncodedColName string,
	nonControlColumns []typing.ColumnMetadata,
	ctrlColumnRepeats int,
	txnCtrlCtrs internaldto.TxnControlCounters,
	secondaryCtrs []internaldto.TxnControlCounters,
	namespaceCollection tablenamespace.Collection,
	sqlSystem sql_system.SQLSystem,
	parameters map[string]interface{},
) PreparedStatementCtx

func NewQueryOnlyPreparedStatementCtx

func NewQueryOnlyPreparedStatementCtx(query string, nonControlCols []typing.ColumnMetadata) PreparedStatementCtx

type PreparedStatementParameterized

type PreparedStatementParameterized interface {
	AddChild(int, PreparedStatementParameterized)
	GetArgs() map[string]interface{}
	GetChildren() map[int]PreparedStatementParameterized
	GetCtx() PreparedStatementCtx
	GetRequestEncoding() string
	IsControlArgsRequired() bool
	WithRequestEncoding(string) PreparedStatementParameterized
	GetNonControlColumns() []typing.ColumnMetadata
}

func NewPreparedStatementParameterized

func NewPreparedStatementParameterized(
	ctx PreparedStatementCtx,
	args map[string]interface{},
	controlArgsRequired bool,
) PreparedStatementParameterized

Jump to

Keyboard shortcuts

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