Documentation
¶
Overview ¶
Package mock provides a mock implementation and driver for testing purposes.
Index ¶
- type Driver
- func (d Driver) DiscardQuery(res dbms.QueryResult, seed *seed.Seed) bool
- func (d Driver) GetQueryResultType(res dbms.QueryResult) dbms.QueryResultType
- func (d Driver) GetSchema(opts dbms.DBOptions) (*schema.Schema, error)
- func (d *Driver) Init(opts dbms.DBOptions) error
- func (d Driver) IsEqualResult(a, b dbms.QueryResult) bool
- func (d *Driver) Reset(opts dbms.DBOptions) error
- func (d Driver) RunQuery(opts dbms.DBOptions, query string) dbms.QueryResult
- func (d Driver) VerifyConnectivity(dbms.DBOptions) (bool, error)
- type Implementation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct{}
Driver for the mock model
func (Driver) DiscardQuery ¶
DiscardQuery always returns true
func (Driver) GetQueryResultType ¶
func (d Driver) GetQueryResultType(res dbms.QueryResult) dbms.QueryResultType
GetQueryResultType always returns dbms.Valid
func (Driver) IsEqualResult ¶
func (d Driver) IsEqualResult(a, b dbms.QueryResult) bool
IsEqualResult always returns true
type Implementation ¶
type Implementation struct {
// contains filtered or unexported fields
}
Implementation for the mock model.
Its generation behavior can be configured using the [AddDropIn] and [SetConfig] methods.
func (*Implementation) AddDropIn ¶
func (m *Implementation) AddDropIn(c translator.Clause, d translator.DropIn)
AddDropIn registers a drop in for the implementation, which is returned when its Implementation.GetDropIns method gets called.
func (Implementation) GetDropIns ¶
func (m Implementation) GetDropIns() translator.DropIns
GetDropIns returns the drop ins passed to the Implementation struct.
func (Implementation) GetOpenCypherConfig ¶
func (m Implementation) GetOpenCypherConfig() config.Config
GetOpenCypherConfig returns the config passed to the Implementation struct.
func (*Implementation) SetConfig ¶
func (m *Implementation) SetConfig(c config.Config)
SetConfig sets the implementation's config, which is returned when its Implementation.GetOpenCypherConfig method gets called.