func SetPipelineBatch(size int) { if size < 1 { size = _BATCH_SIZE } p := value.NewAnnotatedPool(size) _BATCH_POOL.Store(p) }
"github.com/couchbase/query/plan" "github.com/couchbase/query/sort" "github.com/couchbase/query/value" ) type Order struct { base plan *plan.Order values value.AnnotatedValues context *Context terms []string } const _ORDER_CAP = 1024 var _ORDER_POOL = value.NewAnnotatedPool(_ORDER_CAP) func NewOrder(plan *plan.Order) *Order { rv := &Order{ base: newBase(), plan: plan, values: _ORDER_POOL.Get(), } rv.output = rv return rv } func (this *Order) Accept(visitor Visitor) (interface{}, error) { return visitor.VisitOrder(this) }
func init() { atomic.StoreInt64(&pipelineCap, int64(_ITEM_CAP)) p := value.NewAnnotatedPool(_BATCH_SIZE) _BATCH_POOL.Store(p) }