execution

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialect

type Dialect string

type Driver

type Driver interface {
	// Scanner is the main function of all drivers, a scanner will read the GraphQL AST from the context.Context
	Scanner
	// Close gracefully requests the driver to close
	Close() error
	// Dialect returns the dialect name of the driver.
	Dialect() string
}

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

Executor execute based on graphql.FieldContext & graphql.OperationContext The executor holds all drivers that support execution

func NewExecutor

func NewExecutor(drivers map[string]Driver) Executor

func (Executor) Get

func (e Executor) Get(dialect string) (Driver, error)

func (Executor) Scan

func (e Executor) Scan(ctx context.Context, dialect string, model interface{}) error

type Scanner

type Scanner interface {
	Scan(ctx context.Context, v any) error
}

Scanner builds a query based on GraphQL query and scans data into v

Directories

Path Synopsis
sql

Jump to

Keyboard shortcuts

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