Documentation ¶
Index ¶
- Constants
- Variables
- func CheckError(err error) error
- func Migrate(cfg db.Config) error
- type Client
- func (c *Client) Close() error
- func (c *Client) Commit(ctx context.Context) error
- func (c *Client) ExecContext(ctx context.Context, op string, tableName string, query string, ...) (sql.Result, error)
- func (c *Client) GetContext(ctx context.Context, op string, tableName string, dest interface{}, ...) error
- func (c *Client) GetDB(ctx context.Context) sqlx.QueryerContext
- func (c *Client) NamedExecContext(ctx context.Context, op string, tableName string, query string, ...) (sql.Result, error)
- func (c *Client) QueryRowxContext(ctx context.Context, op string, tableName string, query string, ...) *sqlx.Row
- func (c *Client) QueryxContext(ctx context.Context, op string, tableName string, query string, ...) (*sqlx.Rows, error)
- func (c *Client) Rollback(ctx context.Context) error
- func (c *Client) WithTransaction(ctx context.Context, opts *sql.TxOptions) context.Context
- type StringInterfaceMap
- type StringStringMap
Constants ¶
View Source
const ( OpInsert = "INSERT" OpSelectAll = "SELECT_ALL" OpSelect = "SELECT" OpUpdate = "UPDATE" OpDelete = "DELETE" )
Variables ¶
Functions ¶
func CheckError ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ExecContext ¶
func (*Client) GetContext ¶
func (*Client) NamedExecContext ¶
func (*Client) QueryRowxContext ¶
func (*Client) QueryxContext ¶
type StringInterfaceMap ¶
type StringInterfaceMap map[string]interface{}
func (*StringInterfaceMap) Scan ¶
func (m *StringInterfaceMap) Scan(value interface{}) error
type StringStringMap ¶
func (*StringStringMap) Scan ¶
func (m *StringStringMap) Scan(value interface{}) error
Click to show internal directories.
Click to hide internal directories.