db_effect

package module
v0.0.0-...-ada718c Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

DB-Effect

Wikiを参照

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Any

type Any interface {
}

func GetNotNilList

func GetNotNilList(effects []DBEffect, DB Interpreter) ([]Any, error)

type DBEffect

type DBEffect interface {
	Apply(ip Interpreter) RuntimeContext
}

func ValidateInsert

func ValidateInsert(effect Insert, validate *validator.Validate) DBEffect

func ValidateSelect

func ValidateSelect(effect Select, validate *validator.Validate) DBEffect

func ValidateUpdate

func ValidateUpdate(effect Update, validate *validator.Validate) DBEffect

type Delete

type Delete interface {
	Apply(Interpreter) RuntimeContext
	DeletionParam() (DBName string, oldValue Any)
}

Delete

type Insert

type Insert interface {
	Apply(Interpreter) RuntimeContext
	InsertionParam() (DBName string, newValue Any)
}

Insert

type Interpreter

type Interpreter struct {
	Insert func(ctx Insert) RuntimeContext
	Select func(ctx Select) RuntimeContext
	Update func(ctx Update) RuntimeContext
	Delete func(ctx Delete) RuntimeContext
}

Interpreter

type RuntimeContext

type RuntimeContext struct {
	OK  bool
	Err error
	Ctx Any
}

type Select

type Select interface {
	Apply(Interpreter) RuntimeContext
	SelectionParam() (DBName string, query Any)
}

Select

type Update

type Update interface {
	Apply(Interpreter) RuntimeContext
	UpdateParam() (DBName string, newValue Any, upsert bool)
}

Update

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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