typing

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOidForParserColType added in v0.5.451

func GetOidForParserColType(col sqlparser.ColumnType) oid.Oid

func GetOidForSchema

func GetOidForSchema(colSchema anysdk.Schema) oid.Oid

Types

type ColumnMetadata

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

func NewColDescriptor

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

func NewRelayedColDescriptor

func NewRelayedColDescriptor(col RelationalColumn, relTypeStr string) ColumnMetadata

type Config

type Config interface {
	GetGolangKind(discoType string) reflect.Kind
	GetGolangValue(discoType string) interface{}
	GetRelationalType(discoType string) string
	GetOidForSQLType(colType *sql.ColumnType) oid.Oid
	GetPlaceholderColumn(
		table sqldata.ISQLTable, colName string, colOID oid.Oid) sqldata.ISQLColumn
	GetPlaceholderColumnForNativeResult(
		table sqldata.ISQLTable,
		colName string, colSchema *sql.ColumnType) sqldata.ISQLColumn
	GetDefaultOID() oid.Oid
	ExtractFromGolangValue(val interface{}) interface{}
	GetScannableObjectForNativeResult(colSchema *sql.ColumnType) any
}

func NewTypingConfig

func NewTypingConfig(sqlDialect string) (Config, error)

type ORMCoupling

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

func NewORMCoupling

func NewORMCoupling(relationalType string, golangKind reflect.Kind) ORMCoupling

type RelationalColumn

type RelationalColumn interface {
	CanonicalSelectionString() string
	DelimitedSelectionString(string) string
	GetAlias() string
	GetDecorated() string
	GetName() string
	GetIdentifier() string
	GetOID() (oid.Oid, bool)
	GetQualifier() string
	GetType() string
	GetWidth() int
	WithAlias(string) RelationalColumn
	WithDecorated(string) RelationalColumn
	WithUnquote(bool) RelationalColumn
	WithParserNode(sqlparser.SQLNode) RelationalColumn
	WithQualifier(string) RelationalColumn
	WithWidth(int) RelationalColumn
	WithOID(oid.Oid) RelationalColumn
}

func NewRelationalColumn

func NewRelationalColumn(colName string, colType string) RelationalColumn

type RelationalColumnByName added in v0.5.451

type RelationalColumnByName []RelationalColumn

func (RelationalColumnByName) Len added in v0.5.451

func (a RelationalColumnByName) Len() int

func (RelationalColumnByName) Less added in v0.5.451

func (a RelationalColumnByName) Less(i, j int) bool

func (RelationalColumnByName) Swap added in v0.5.451

func (a RelationalColumnByName) Swap(i, j int)

Jump to

Keyboard shortcuts

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