dbquery

package
v0.0.0-...-acf744c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryParsed

type QueryParsed struct {
	SQL              string
	PubKey           []byte
	Signature        []byte
	TransactionBytes []byte
	KeyCol           string
	KeyVal           string
	RowBeforeQuery   map[string]string
	RowDoesNotExist  bool
	Structure        sqlparser.SQLQueryParserInterface
}

func (QueryParsed) GetKeyValue

func (qp QueryParsed) GetKeyValue() string

func (QueryParsed) IsSelect

func (qp QueryParsed) IsSelect() bool

Info about a parsed query. Check if is select

func (QueryParsed) IsUpdate

func (qp QueryParsed) IsUpdate() bool

Info about a parsed query. Check if is update (insert, update, delete, create table, drop table)

func (QueryParsed) IsUpdateOther

func (qp QueryParsed) IsUpdateOther() bool

func (QueryParsed) ReferenceID

func (qp QueryParsed) ReferenceID() string

type QueryProcessorInterface

type QueryProcessorInterface interface {
	ParseQuery(sqlquery string, flags int) (QueryParsed, error)
	ExecuteQuery(sql string) (*structures.SQLUpdate, error)
	ExecuteParsedQuery(qp QueryParsed) (*structures.SQLUpdate, error)
	ExecuteQueryFromTX(sql structures.SQLUpdate) error
	ExecuteRollbackQueryFromTX(sql structures.SQLUpdate) error
	MakeSQLUpdateStructure(parsed QueryParsed) (structures.SQLUpdate, error)
}

func NewQueryProcessor

func NewQueryProcessor(DB database.DBManager, Logger *utils.LoggerMan) QueryProcessorInterface

type SQLUpdateInterface

type SQLUpdateInterface interface {
	CheckUpdateCanFollow(sqlUpdPrev *structures.SQLUpdate) error
	CheckAllowsMultipleSubtransactions(sqlUpdPrev *structures.SQLUpdate) (bool, error)
	GetAlternativeRefID() ([]byte, bool, error)
	RequiresBaseTransation() bool
}

func NewSQLUpdateManager

func NewSQLUpdateManager(SQLUpdate structures.SQLUpdate) (SQLUpdateInterface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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