mocks

package
v3.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDriver

type MockDriver struct{}

MockDriver is a mock implementation of the bdb driver Interface

func (*MockDriver) Assemble

func (m *MockDriver) Assemble(config drivers.Config) (dbinfo *drivers.DBInfo, err error)

Assemble the DBInfo

func (*MockDriver) Close

func (m *MockDriver) Close()

Close mimics a database close call

func (*MockDriver) Columns

func (m *MockDriver) Columns(schema, tableName string, whitelist, blacklist []string) ([]drivers.Column, error)

Columns returns a list of mock columns

func (*MockDriver) ForeignKeyInfo

func (m *MockDriver) ForeignKeyInfo(schema, tableName string) ([]drivers.ForeignKey, error)

ForeignKeyInfo returns a list of mock foreignkeys

func (*MockDriver) Imports

func (m *MockDriver) Imports() (importers.Collection, error)

Imports return the set of imports that should be merged

func (*MockDriver) LeftQuote

func (m *MockDriver) LeftQuote() byte

LeftQuote is the quoting character for the left side of the identifier

func (*MockDriver) Open

func (m *MockDriver) Open() error

Open mimics a database open call and returns nil for no error

func (*MockDriver) PrimaryKeyInfo

func (m *MockDriver) PrimaryKeyInfo(schema, tableName string) (*drivers.PrimaryKey, error)

PrimaryKeyInfo returns mock primary key info for the passed in table name

func (*MockDriver) RightQuote

func (m *MockDriver) RightQuote() byte

RightQuote is the quoting character for the right side of the identifier

func (*MockDriver) TableNames

func (m *MockDriver) TableNames(schema string, whitelist, blacklist []string) ([]string, error)

TableNames returns a list of mock table names

func (*MockDriver) Templates

func (m *MockDriver) Templates() (map[string]string, error)

Templates returns the overriding templates for the driver

func (*MockDriver) TranslateColumnType

func (m *MockDriver) TranslateColumnType(c drivers.Column) drivers.Column

TranslateColumnType converts a column to its "null." form if it is nullable

func (*MockDriver) UseIndexPlaceholders

func (m *MockDriver) UseIndexPlaceholders() bool

UseIndexPlaceholders returns true to indicate fake support of indexed placeholders

func (*MockDriver) UseLastInsertID

func (m *MockDriver) UseLastInsertID() bool

UseLastInsertID returns a database mock LastInsertID compatibility flag

func (*MockDriver) UseTopClause

func (m *MockDriver) UseTopClause() bool

UseTopClause returns a database mock SQL TOP clause compatibility flag

Jump to

Keyboard shortcuts

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