Versions in this module Expand all Collapse all v1 v1.4.4 Nov 9, 2022 v1.4.3 Nov 9, 2022 Changes in this version + var ErrNotFound = sqlx.ErrNotFound + type CachedConn struct + func NewConn(db sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) CachedConn + func NewConnWithCache(db sqlx.SqlConn, c cache.Cache) CachedConn + func NewNodeConn(db sqlx.SqlConn, rds *redis.Redis, opts ...cache.Option) CachedConn + func (cc CachedConn) DelCache(keys ...string) error + func (cc CachedConn) DelCacheCtx(ctx context.Context, keys ...string) error + func (cc CachedConn) Exec(exec ExecFn, keys ...string) (sql.Result, error) + func (cc CachedConn) ExecCtx(ctx context.Context, exec ExecCtxFn, keys ...string) (sql.Result, error) + func (cc CachedConn) ExecNoCache(q string, args ...interface{}) (sql.Result, error) + func (cc CachedConn) ExecNoCacheCtx(ctx context.Context, q string, args ...interface{}) (sql.Result, error) + func (cc CachedConn) GetCache(key string, v interface{}) error + func (cc CachedConn) GetCacheCtx(ctx context.Context, key string, v interface{}) error + func (cc CachedConn) QueryRow(v interface{}, key string, query QueryFn) error + func (cc CachedConn) QueryRowCtx(ctx context.Context, v interface{}, key string, query QueryCtxFn) error + func (cc CachedConn) QueryRowIndex(v interface{}, key string, keyer func(primary interface{}) string, ...) error + func (cc CachedConn) QueryRowIndexCtx(ctx context.Context, v interface{}, key string, ...) error + func (cc CachedConn) QueryRowNoCache(v interface{}, q string, args ...interface{}) error + func (cc CachedConn) QueryRowNoCacheCtx(ctx context.Context, v interface{}, q string, args ...interface{}) error + func (cc CachedConn) QueryRowsNoCache(v interface{}, q string, args ...interface{}) error + func (cc CachedConn) QueryRowsNoCacheCtx(ctx context.Context, v interface{}, q string, args ...interface{}) error + func (cc CachedConn) SetCache(key string, val interface{}) error + func (cc CachedConn) SetCacheCtx(ctx context.Context, key string, val interface{}) error + func (cc CachedConn) Transact(fn func(sqlx.Session) error) error + func (cc CachedConn) TransactCtx(ctx context.Context, fn func(context.Context, sqlx.Session) error) error + type ExecCtxFn func(ctx context.Context, conn sqlx.SqlConn) (sql.Result, error) + type ExecFn func(conn sqlx.SqlConn) (sql.Result, error) + type IndexQueryCtxFn func(ctx context.Context, conn sqlx.SqlConn, v interface{}) (interface{}, error) + type IndexQueryFn func(conn sqlx.SqlConn, v interface{}) (interface{}, error) + type PrimaryQueryCtxFn func(ctx context.Context, conn sqlx.SqlConn, v, primary interface{}) error + type PrimaryQueryFn func(conn sqlx.SqlConn, v, primary interface{}) error + type QueryCtxFn func(ctx context.Context, conn sqlx.SqlConn, v interface{}) error + type QueryFn func(conn sqlx.SqlConn, v interface{}) error