Documentation ¶
Index ¶
- func MySQLBypassDupError(err error) error
- func MySQLIsDupError(err error) bool
- func StringsToIN(strs []string) string
- func Transactional(db *sql.DB, fns ...func(tx *sql.Tx) (err error)) (err error)
- func Uint64ToIN(ids []uint64) string
- type SQLExecutor
- type SQLExecutorQuerier
- type SQLQuerier
- type SQLStringer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MySQLBypassDupError ¶
MySQLBypassDupError if err is a MySQL duplicate error nil will be returned. All other errors are returned.
func MySQLIsDupError ¶
MySQLIsDupError checks whether err is a MySQL duplicate error.
func StringsToIN ¶
StringsToIN converts strings to an "IN type" that can be used for SQL. Be aware that this is NOT SQL injection safe.
func Transactional ¶
func Uint64ToIN ¶
Uint64ToIN converts uint64s to an "IN type" that can be used for SQL. Be aware that this is NOT SQL injection safe.
Types ¶
type SQLExecutor ¶
type SQLExecutorQuerier ¶
type SQLExecutorQuerier interface { SQLExecutor SQLQuerier }
type SQLQuerier ¶
type SQLStringer ¶
type SQLStringer interface {
SQLString() string
}
Click to show internal directories.
Click to hide internal directories.