adapter

package
v0.0.0-...-8285219 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Type  ColumnType
	Name  string
	Alias string
	// contains filtered or unexported fields
}

func (*Column) IsPrimaryKey

func (c *Column) IsPrimaryKey() bool

func (*Column) SetPrimaryKey

func (c *Column) SetPrimaryKey()

type ColumnType

type ColumnType string
const (
	Int    ColumnType = "Int"
	Float  ColumnType = "Float"
	String ColumnType = "String"
)

type DefaultSqlAdapter

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

DefaultSqlAdapter is a default implementation of SqlAdapter. It is use to query single table with custom fields.

func NewDefaultSqlAdapter

func NewDefaultSqlAdapter(tableName string, columns []*Column, node core.Node) *DefaultSqlAdapter

func (*DefaultSqlAdapter) Resolve

type SqlAdapter

type SqlAdapter interface {
	Resolve() graphql.FieldResolveFn
}

SqlAdapter is a part of Node interface, which is designed to bridge business objects with SQL queries.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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