Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
type DataStore interface {
String() string
Prepare(queryFile string) error
/*
Statement(queryName string, obj interface{}) (*sqlx.NamedStmt, error)
Read(queryName string, dest, arg interface{}) (error)
Create(queryName string, arg interface{}) (int64, error)
Update(queryName string, arg interface{}) (int64, error)
Delete(queryName string, arg interface{}) (int64, error)
*/
NamedStmt(queryName string, obj interface{}) (*sqlx.NamedStmt, error)
Exec(queryName string, arg interface{}) (int64, error)
Read(queryName string, dest, arg interface{}) error
Begin() (*sqlx.Tx, error)
Close() error
}
func NewDataStore ¶
NewDataStore returns a DataStore interface.
func NewMysqlDataStore ¶
NewmysqlDataStore creates a new instance of mysqlDataStore.
Click to show internal directories.
Click to hide internal directories.