adaptor

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RecordType = "RECORD"
	ArrayType  = "ARRAY"

	RerouteQuery = "SELECT ?"
)

Variables

This section is empty.

Functions

func SetSchemaAdaptor

func SetSchemaAdaptor(ctx context.Context, adaptorSchema SchemaAdaptor) context.Context

Types

type SchemaAdaptor

type SchemaAdaptor interface {

	// GetColumnAdaptor gets a specific column adapter that makes the column fit the "demand"
	GetColumnAdaptor(name string) SchemaColumnAdaptor
}

SchemaAdaptor adapts row column results to fit the "demand"

func GetSchemaAdaptor

func GetSchemaAdaptor(ctx context.Context) SchemaAdaptor

type SchemaColumnAdaptor

type SchemaColumnAdaptor interface {

	// AdaptValue gets a specific column value that fit the "demand"
	AdaptValue(value driver.Value) (driver.Value, error)
}

SchemaColumnAdaptor adapts column results to fit the "demand"

Jump to

Keyboard shortcuts

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