Documentation ¶
Index ¶
- type MockDriver
- func (m *MockDriver) Assemble(config drivers.Config) (dbinfo *drivers.DBInfo, err error)
- func (m *MockDriver) Close()
- func (m *MockDriver) Columns(schema, tableName string, whitelist, blacklist []string) ([]drivers.Column, error)
- func (m *MockDriver) ForeignKeyInfo(schema, tableName string) ([]drivers.ForeignKey, error)
- func (m *MockDriver) Imports() (importers.Collection, error)
- func (m *MockDriver) LeftQuote() byte
- func (m *MockDriver) Open() error
- func (m *MockDriver) PrimaryKeyInfo(schema, tableName string) (*drivers.PrimaryKey, error)
- func (m *MockDriver) RightQuote() byte
- func (m *MockDriver) TableNames(schema string, whitelist, blacklist []string) ([]string, error)
- func (m *MockDriver) Templates() (map[string]string, error)
- func (m *MockDriver) TranslateColumnType(c drivers.Column) drivers.Column
- func (m *MockDriver) UseIndexPlaceholders() bool
- func (m *MockDriver) UseLastInsertID() bool
- func (m *MockDriver) UseTopClause() bool
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) 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