Documentation ¶
Index ¶
- Variables
- type CachedConn
- func (cc CachedConn) DelCache(keys ...string) error
- func (cc CachedConn) Exec(exec ExecFn, keys ...string) (sql.Result, error)
- func (cc CachedConn) ExecNoCache(q string, args ...interface{}) (sql.Result, error)
- func (cc CachedConn) GetCache(key string, v interface{}) error
- func (cc CachedConn) QueryRow(v interface{}, key string, query QueryFn) error
- func (cc CachedConn) QueryRowIndex(v interface{}, key string, keyer func(primary interface{}) string, ...) error
- func (cc CachedConn) QueryRowNoCache(v interface{}, q string, args ...interface{}) error
- func (cc CachedConn) QueryRowsNoCache(v interface{}, q string, args ...interface{}) error
- func (cc CachedConn) SetCache(key string, v interface{}) error
- func (cc CachedConn) Transact(fn func(sqlx.Session) error) error
- type ExecFn
- type IndexQueryFn
- type PrimaryQueryFn
- type QueryFn
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = sqlx.ErrNotFound
)
Functions ¶
This section is empty.
Types ¶
type CachedConn ¶
type CachedConn struct {
// contains filtered or unexported fields
}
func NewNodeConn ¶
func (CachedConn) DelCache ¶
func (cc CachedConn) DelCache(keys ...string) error
func (CachedConn) ExecNoCache ¶
func (cc CachedConn) ExecNoCache(q string, args ...interface{}) (sql.Result, error)
func (CachedConn) GetCache ¶
func (cc CachedConn) GetCache(key string, v interface{}) error
func (CachedConn) QueryRow ¶
func (cc CachedConn) QueryRow(v interface{}, key string, query QueryFn) error
func (CachedConn) QueryRowIndex ¶
func (cc CachedConn) QueryRowIndex(v interface{}, key string, keyer func(primary interface{}) string, indexQuery IndexQueryFn, primaryQuery PrimaryQueryFn) error
func (CachedConn) QueryRowNoCache ¶
func (cc CachedConn) QueryRowNoCache(v interface{}, q string, args ...interface{}) error
func (CachedConn) QueryRowsNoCache ¶
func (cc CachedConn) QueryRowsNoCache(v interface{}, q string, args ...interface{}) error
QueryRowsNoCache doesn't use cache, because it might cause consistency problem.
func (CachedConn) SetCache ¶
func (cc CachedConn) SetCache(key string, v interface{}) error
type IndexQueryFn ¶
type PrimaryQueryFn ¶
Click to show internal directories.
Click to hide internal directories.