func NewOnQueryObjectFromStatement(stmt sqlparser.Statement) OnQueryObject {
	return &onQueryObject{statement: stmt}
}
NewOnQueryObjectFromStatement return OnQueryObject with Statement as value
package base
import (
	"context"
	"github.com/cossacklabs/acra/logging"
	"github.com/cossacklabs/acra/sqlparser"
	"github.com/sirupsen/logrus"
)
type OnQueryObject interface {
	Statement() (sqlparser.Statement, error)
	Query() string
}
type onQueryObject struct {
	statement sqlparser.Statement
	query     string
}
func (obj *onQueryObject) Statement() (sqlparser.Statement, error) {
	if obj.statement != nil {
		return obj.statement, nil
	}
	return sqlparser.Parse(obj.query)
}
func (obj *onQueryObject) Query() string {
	if obj.query == "" {
		return sqlparser.String(obj.statement)
	}
	return obj.query
}