action

package
v0.0.0-...-854da8c Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actioner

type Actioner func(dbs db.Database, d *sql.DB, cmd *sqlcommand.SQLCommand, ctx *Context) error

Actioner - the function of specific actions for each database

type Context

type Context struct {
	Snap actionSnap
	// contains filtered or unexported fields
}

A Context - this is a context when action executing

func NewContext

func NewContext() *Context

NewContext - Create new Context

func (*Context) Get

func (c *Context) Get(key string) interface{}

Get - returns value(or nil) for the key

func (*Context) GetDef

func (c *Context) GetDef(key string, def interface{}) interface{}

GetDef - returns value or default for the key

func (*Context) IncInt

func (c *Context) IncInt(key string, delta int) int

IncInt - increment value for a key and retrun it

func (*Context) IncInt64

func (c *Context) IncInt64(key string, delta int64) int64

IncInt64 - increment value for a key and retrun it

func (*Context) Set

func (c *Context) Set(key string, value interface{})

Set - set the pair: key and value

Jump to

Keyboard shortcuts

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