Documentation ¶
Index ¶
- Variables
- func Asc(asc bool) string
- func GtLtSymbol(asc bool) string
- func In(query string, args ...interface{}) (string, []interface{})
- func InCondition(and bool, field string, setLen int) string
- func IsNoRows(err error) bool
- func Limit(l, max uint16) uint16
- func Limit100(l uint16) uint16
- func NPList(n, p int) string
- func Named(query string, arg interface{}) (string, []interface{})
- func OrderByField(field string, setLen int) string
- func OrderLimit(field string, asc bool, l, max uint16) string
- func OrderLimit100(field string, asc bool, l uint16) string
- func PList(p int) string
- func PanicIfIsntNoRows(err error)
- func ReturnNotFoundIfIsNoRows(err error)
- type Args
- type ReplicaSet
- type Row
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRows = sql.ErrNoRows ErrConnDone = sql.ErrConnDone ErrTxDone = sql.ErrTxDone )
Functions ¶
func GtLtSymbol ¶
func OrderByField ¶
func PanicIfIsntNoRows ¶
func PanicIfIsntNoRows(err error)
func ReturnNotFoundIfIsNoRows ¶
func ReturnNotFoundIfIsNoRows(err error)
Types ¶
type ReplicaSet ¶
type ReplicaSet interface { Primary() *sqlx.DB Slaves() []*sqlx.DB RandSlave() *sqlx.DB SetConnMaxLifetime(d time.Duration) SetMaxIdleConns(n int) SetMaxOpenConns(n int) }
func MustNewReplicaSet ¶
func MustNewReplicaSet(primaryDataSourceName string, slaveDataSourceNames ...string) ReplicaSet
func NewReplicaSet ¶
func NewReplicaSet(primaryDataSourceName string, slaveDataSourceNames ...string) (ReplicaSet, error)
Click to show internal directories.
Click to hide internal directories.