executor

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONST_ATHENA_QUERY_SLEEP_DURATION = 2 // in seconds
	CONST_ATHENA_QUERY_SUCCESS        = "SUCCEEDED"
	CONST_ATHENA_QUERY_FAILED         = "FAILED"
	CONST_NIL                         = "NIL"
	CONST_DATABASE_REWARDS_GATEWAY    = "rewards_gateway"
)
View Source
const READ_REPLICA_DRIVER_INDEX = 1

Variables

View Source
var (
	AthenaExecutorInstance *athenaExecutor

	AtheClient *athena.Athena
)
View Source
var (
	MysqlExecutorInstance *mysqlExecutor

	MysqlClient *sql.DB
)
View Source
var (
	PrestoExecutorInstance *prestoExecutor

	PrestoClient *sql.DB
)
View Source
var (
	TrinoExecutorInstance *trinoExecutor

	TrinoClient *sql.DB
)

Functions

func GetQueryResponse

func GetQueryResponse(rows *sql.Rows) (map[string]string, [][]interface{}, []string, error)

func InitializeAthenaClient

func InitializeAthenaClient(config *driverConfig.AthenaConfig) error

func InitializeMysqlClient

func InitializeMysqlClient(config *driverConfig.MysqlConfig) error

func InitializePrestoClient

func InitializePrestoClient(config *driverConfig.PrestoConfig) error

func InitializeTrinoClient

func InitializeTrinoClient(config *driverConfig.TrinoConfig) error

func MapAthenaResponse

func MapAthenaResponse(response *athena.GetQueryResultsOutput) (map[string]string, [][]interface{}, []string)

func RunAthenaQuery

func RunAthenaQuery(query string) (*athena.GetQueryResultsOutput, error)

Types

type Executor

type Executor interface {
	Execute(query string) (map[string]string, [][]interface{}, error)
}

Jump to

Keyboard shortcuts

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