sql

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package sql defines a Backend that is responsible for communicating with SQL databases and other external systems

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnexpectedJSON         = errors.New("Received JSON data that we are unable to parse")
	ErrMismatchedAffectedRows = errors.New("The amount of rows affected should be sane")
	ErrNoLastInsertID         = errors.New("Database does not support getting the last inserted ID")
)

Functions

func GetWorkflowType

func GetWorkflowType(columnWithTable string) interface{}

func New

func New() endpoint.Endpoint

Types

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool // Valid is true if Time is not NULL
}

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type SqlBackend

type SqlBackend struct {
	*backend.Backend
	DB                     *sql.DB
	Templates              map[string]string
	SchemaMapping          map[string]*descriptor.SchemaMapping
	FilterPredicateMapping map[filter.Predicate]string
	NewSchemaMapping       func([]string, []*sql.ColumnType) (*descriptor.SchemaMapping, error)
	Transactions           sync.Map
}

func (*SqlBackend) DeleteTx

func (s *SqlBackend) DeleteTx(key interface{})

func (*SqlBackend) LoadTx

func (s *SqlBackend) LoadTx(key interface{}) (value interface{}, ok bool)

func (*SqlBackend) SaveSchemaMapping

func (s *SqlBackend) SaveSchemaMapping() (err error)

func (*SqlBackend) StoreTx

func (s *SqlBackend) StoreTx(key, value interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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