executor

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotImplemented = errors.New("not implemented")
	ParsingError   = errors.New("parsing error")
)

Functions

This section is empty.

Types

type Engine

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

Engine is the root struct of RamSQL server

func NewEngine

func NewEngine() (e *Engine, err error)

New initialize a new RamSQL server

func (*Engine) Begin

func (e *Engine) Begin() (*Tx, error)

func (*Engine) Stop

func (e *Engine) Stop()

type NamedValue

type NamedValue struct {
	Name    string
	Ordinal int
	Value   any
}

type Tx

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

func NewTx

func NewTx(ctx context.Context, e *Engine, opts sql.TxOptions) (*Tx, error)

func (*Tx) Commit

func (t *Tx) Commit() error

Commit the transaction on server

func (*Tx) ExecContext

func (t *Tx) ExecContext(ctx context.Context, query string, args []NamedValue) (int64, int64, error)

func (*Tx) QueryContext

func (t *Tx) QueryContext(ctx context.Context, query string, args []NamedValue) ([]string, []*agnostic.Tuple, error)

func (*Tx) Rollback

func (t *Tx) Rollback() error

Rollback all changes

Jump to

Keyboard shortcuts

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