savepoint

package
v0.0.0-...-d0f7b5f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package savepoint models the savepoint stack and transaction support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

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

Stack models the savepoint stack and its interaction with transactions.

func New

func New() *Stack

New creates a new Stack.

func (*Stack) Begin

func (s *Stack) Begin() error

Begin a transaction.

func (*Stack) End

func (s *Stack) End() error

End a transaction.

func (*Stack) HasSavepoints

func (s *Stack) HasSavepoints() bool

HasSavepoints if there are any savepoints on the Stack.

func (*Stack) InTransaction

func (s *Stack) InTransaction() bool

InTransaction if Stack has a transaction.

func (*Stack) Open

func (s *Stack) Open() bool

Open reports whether InTransaction or HasSavepoints.

func (*Stack) Release

func (s *Stack) Release(sp string) error

Release a savepoint from the Stack.

func (*Stack) Savepoint

func (s *Stack) Savepoint(sp string)

Savepoint adds a new savepoint to the Stack.

func (*Stack) Top

func (s *Stack) Top() string

Top returns the outermost savepoint name, if HasSavepoints.

Jump to

Keyboard shortcuts

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