Open unix2dos opened 1 year ago
func (pool ConnPool) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) { ftQuery, stQuery, table, err := pool.sharding.resolve(query, args...) if err != nil { return nil, err } pool.sharding.querys.Store("last_query", stQuery) if table != "" { if r, ok := pool.sharding.configs[table]; ok { if r.DoubleWrite { pool.ConnPool.ExecContext(ctx, ftQuery, args...) } } } return pool.ConnPool.QueryContext(ctx, stQuery, args...) }
Your Question
The document you expected this should be explained
Expected answer