Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailRegisterDriver = errors.New("failed to register driver") ErrFailReadFile = errors.New("failed to read file") ErrInvalidFixture = errors.New("invalid fixture file format") ErrNotFoundDriver = errors.New("unknown driver(forgotten import?)") ErrUnknownFileExt = errors.New("unknown file ext") )
error variables
Functions ¶
Types ¶
type Driver ¶
type Driver interface { TrimComment(sql string) string EscapeKeyword(keyword string) string EscapeValue(value string) string ExecSQL(tx *sql.Tx, sql string) error }
Driver is database adapter
type Fixture ¶
type Fixture struct {
// contains filtered or unexported fields
}
Fixture supply fixture methods sample:
import _ "github.com/takashabe/go-fixture/mysql" ... fixture.Load("path/to/hoge.yml", &Hoge{})
func NewFixture ¶
NewFixture returns initialized Fixture
type QueryModelWithYaml ¶
type QueryModelWithYaml struct { Table string `yaml:"table"` Record []map[string]string `yaml:"record"` }
QueryModelWithYaml represent fixture yaml file mapper
Click to show internal directories.
Click to hide internal directories.