func (avg average) Flush() { if *avg.ready { avg.output(util.CreateStartRelation()) avg.output(util.CreateRelation(currentState(avg))) avg.output(util.CreateEndRelation()) } }
func (m Merger) Flush() { m.output.Write(util.CreateStartRelation()) m.mu.Lock() // Output keys sorted by index so the ui is consistent for i := 0; i < len(m.aggregate); i++ { m.output.Write(util.CreateRelation(m.aggregate[i])) } m.mu.Unlock() m.output.Write(util.CreateEndRelation()) queryString := strings.Join(os.Args[0:], " ") m.output.Write(util.CreateMeta(map[string]interface{}{"_queryString": queryString})) }
func (sumOp sum) Flush() { sumOp.output(util.CreateStartRelation()) sumOp.output(util.CreateRelation(currentState(sumOp))) sumOp.output(util.CreateEndRelation()) }
func (ct count) Flush() { ct.output(util.CreateStartRelation()) ct.output(util.CreateRelation(currentState(ct))) ct.output(util.CreateEndRelation()) }