Documentation
¶
Index ¶
- func DSN(username, password, endpoint, port, tls string, binlog *bool) string
- func ExecWrapper(ctx context.Context, db xsql.DB, query ExecQuery) error
- func New(creds map[string][]byte, tls *string, binlog *bool) xsql.DB
- func QuoteIdentifier(id string) string
- func QuoteValue(id string) string
- func SplitUserHost(user string) (username, host string)
- type ExecQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecWrapper ¶ added in v0.10.0
ExecWrapper is a wrapper function for xsql.DB.Exec() that allows the execution of optional queries before and after the provided query
func SplitUserHost ¶
SplitUserHost splits a MySQL user by name and host
Types ¶
type ExecQuery ¶ added in v0.8.0
type ExecQuery struct { // Query defines the sql statement to execute Query string // ErrorValue defines what error will be returned if the provided sql statement failed when executing ErrorValue string }
ExecQuery declares the query to execute and its error value if it fails
Click to show internal directories.
Click to hide internal directories.