Пример #1
0
func (avg average) Flush() {
	if *avg.ready {
		avg.output(util.CreateStartRelation())
		avg.output(util.CreateRelation(currentState(avg)))
		avg.output(util.CreateEndRelation())
	}
}
Пример #2
0
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}))
}
Пример #3
0
func (sumOp sum) Flush() {
	sumOp.output(util.CreateStartRelation())
	sumOp.output(util.CreateRelation(currentState(sumOp)))
	sumOp.output(util.CreateEndRelation())
}
Пример #4
0
func (ct count) Flush() {
	ct.output(util.CreateStartRelation())
	ct.output(util.CreateRelation(currentState(ct)))
	ct.output(util.CreateEndRelation())
}