// ToMatch convert to bson.M for query match
ToMatch convert to bson.M for query match
// ToMatch convert to bson . M for query match
func (q Query) ToMatch() (m bson.M) {
	m = bson.M{}
	if !q.Timestamp.IsFullDay() {
		m["timestamp"] = q.Timestamp.ToMatch()
	}
	BSONPutMatchField(m, "crid", q.Crid)
	BSONPutMatchField(m, "hostname", q.Hostname)
	BSONPutMatchField(m, "env", q.Env)
	BSONPutMatchField(m, "project", q.Project)
	BSONPutMatchField(m, "topic", q.Topic)
	BSONPutTextField(m, q.Message)
	return
}
func ( q Query ) ToMatch ( ) ( m bson . M ) { m = bson . M { } if ! q . Timestamp . IsFullDay ( ) { m [ " " ] = q . Timestamp . ToMatch ( ) } BSONPutMatchField ( m , " " , q . Crid ) BSONPutMatchField ( m , " " , q . Hostname ) BSONPutMatchField ( m , " " , q . Env ) BSONPutMatchField ( m , " " , q . Project ) BSONPutMatchField ( m , " " , q . Topic ) BSONPutTextField ( m , q . Message ) return }
ToMatch convert to bson.M for query match
ToMatch convert to bson . M for query match