func (manager *ArrayQueryObserverableManager) RegisteredObserversCount() int {
	return len(manager.subscribers)
}
RegisteredObserversCount return count of registered observers
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
}
func NewOnQueryObjectFromStatement(stmt sqlparser.Statement) OnQueryObject {
	return &onQueryObject{statement: stmt}
}
func NewOnQueryObjectFromQuery(query string) OnQueryObject {
	return &onQueryObject{query: query}
}
type BoundValue interface {
	Data() []byte
	Format() BoundValueFormat
}
type BoundValueFormat int
const (
	TextFormat BoundValueFormat = iota
	BinaryFormat
)
type boundValue struct {
	data   []byte
	format BoundValueFormat
}
func (v *boundValue) Data() []byte {
	return v.data
}
func (v *boundValue) Format() BoundValueFormat {
	return v.format
}
func NewBoundValue(data []byte, format BoundValueFormat) BoundValue {
	return &boundValue{data, format}
}
type QueryObserver interface {
	ID() string
	OnQuery(data OnQueryObject) (OnQueryObject, bool, error)
	OnBind(statement sqlparser.Statement, values []BoundValue) ([]BoundValue, bool, error)
}
type QueryObservable interface {
	AddQueryObserver(QueryObserver)
	RegisteredObserversCount() int
}
type QueryObserverManager interface {
	QueryObserver
	QueryObservable
}
type ArrayQueryObserverableManager struct {
	subscribers []QueryObserver
	logger      *logrus.Entry
}
func NewArrayQueryObserverableManager(ctx context.Context) (*ArrayQueryObserverableManager, error) {
	return &ArrayQueryObserverableManager{logger: logging.GetLoggerFromContext(ctx)}, nil
}
func (manager *ArrayQueryObserverableManager) AddQueryObserver(obs QueryObserver) {
	manager.subscribers = append(manager.subscribers, obs)
}