Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct {
LastQuery storage.Query
LastModel model.Model
ReturnPlan storage.Plan
ReturnErr error
}
Compiler captures the query and returns a predefined plan.
type Executor ¶
type Executor struct {
ExecutedQueries []string
ExecutedArgs [][]any
ReturnExecErr error
ReturnQueryRow storage.Scanner
ReturnQueryRows storage.Rows
ReturnQueryErr error
ReturnCloseErr error
}
Executor captures execution calls.
type Model ¶
Model is a mock implementation of the model.Model interface.
func (Model) DecodeFields ¶
func (m Model) DecodeFields(r model.FieldReader)
func (Model) EncodeFields ¶
func (m Model) EncodeFields(w model.FieldWriter)
type Rows ¶
type TxBoundExecutor ¶
type TxBoundExecutor struct {
Executor
CommitCalled bool
RollbackCalled bool
CommitErr error
RollbackErr error
}
func (*TxBoundExecutor) Commit ¶
func (m *TxBoundExecutor) Commit() error
func (*TxBoundExecutor) Rollback ¶
func (m *TxBoundExecutor) Rollback() error
type TxExecutor ¶
type TxExecutor struct {
Executor
Bound *TxBoundExecutor
BeginTxErr error
}
TxExecutor records BeginTx calls.
func (*TxExecutor) BeginTx ¶
func (m *TxExecutor) BeginTx() (storage.TxBoundExecutor, error)
Click to show internal directories.
Click to hide internal directories.