executor

package
v0.0.0-...-8b7ab15 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	DataAvailable  chan struct{}
	CommitDone     chan struct{}
	IsServerAction bool
	IsClientAction bool
	Action         string
	IsQuery        bool
	Input          []interface{}
	Output         [][]interface{}
	OutputPtr      [][]interface{}
	LastInsertedId int64
	RowsAffected   int64
	Error          string
}

Fields common to all Executor instances

func New

func New() *Executor

func (*Executor) Execute

func (e *Executor) Execute(stmt *sql.Stmt, tx *sql.Tx, sp string)

func (*Executor) GetAction

func (e *Executor) GetAction() string

func (*Executor) SetCommitDone

func (e *Executor) SetCommitDone()

func (*Executor) SetDataAvailable

func (e *Executor) SetDataAvailable()

func (*Executor) SetInput

func (e *Executor) SetInput(input []interface{})

type ExecutorImpl

type ExecutorImpl interface {

	// Done in the echo goroutine
	// receive a web socket as an input to fullfill the internal struct of the instance.
	SetInput(input []interface{})

	// Done in the sql execution goroutine
	// Passwd a reference to the current transaction, passed a reference to the dictionary with all prepared statements, and the one that acts as cache
	// sp: savepoint idenfiticator: used to rollback or release the current execution
	Execute(stmt *sql.Stmt, tx *sql.Tx, sp string)

	SetDataAvailable()
	SetCommitDone()
	GetAction() string
}

Executor implementation Interface

Jump to

Keyboard shortcuts

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