func (x *Capabilities) Zero() bool {
	if x == nil {
		return true
	}
	ret := true
	x.ProtoReflect().Range(func(d protoreflect.FieldDescriptor, v protoreflect.Value) bool {
		if d.Kind() == protoreflect.BoolKind && v.Bool() {
			ret = false
		}
		return ret
	})
	return ret
}
Zero returns true if no capabilities are set.
package capabilities
import (
	"database/sql/driver"
	"sort"
	"strings"
	"github.com/pkg/errors"
	"google.golang.org/protobuf/proto"
	"google.golang.org/protobuf/reflect/protoreflect"
)
var all = &Capabilities{}
func init() {
	file_capabilities_proto_init()
	ref := all.ProtoReflect()
	fields := all.ProtoReflect().Descriptor().Fields()
	for i, j := 0, fields.Len(); i < j; i++ {
		if fd := fields.Get(i); fd.Kind() == protoreflect.BoolKind {
			ref.Set(fd, protoreflect.ValueOfBool(true))
		}
	}
}
func Parse(x []string) (*Capabilities, error) {
	ret := &Capabilities{}
	ref := ret.ProtoReflect()
	for i := range x {
		l := strings.ToLower(x[i])
		if l == "all" {
			ret = All()
		} else if fd := ref.Descriptor().Fields().ByName(protoreflect.Name(l)); fd != nil {
			ref.Set(fd, protoreflect.ValueOfBool(true))
		} else {
			return nil, errors.Errorf("unknown capability %q", x[i])
		}
	}
	return ret, nil
}
func All() *Capabilities {
	return proto.Clone(all).(*Capabilities)
}
func (x *Capabilities) AsBits() int64 {
	ret := int64(0)
	x.ProtoReflect().Range(func(d protoreflect.FieldDescriptor, v protoreflect.Value) bool {
		if d.Kind() == protoreflect.BoolKind && v.Bool() {
			ret |= 1 << (d.Number() - 1)
		}
		return true
	})
	return ret
}
func (x *Capabilities) IsSubsetOf(other *Capabilities) bool {
	xBits := x.AsBits()
	return xBits&other.AsBits() == xBits
}
func (x *Capabilities) Scan(v interface{}) error {
	i, ok := v.(int64)
	if !ok {
		return errors.Errorf("cannot convert from %T", v)
	}
	x.set(i)
	return nil
}
func (x *Capabilities) Pretty() string {
	if proto.Equal(all, x) {
		return "all"
	}
	var ret []string
	x.ProtoReflect().Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool {
		if fd.Kind() == protoreflect.BoolKind && val.Bool() {
			ret = append(ret, string(fd.Name()))
		}
		return true
	})
	sort.Strings(ret)
	return strings.Join(ret, ",")
}
func (x *Capabilities) Value() (driver.Value, error) {
	if x == nil {
		return 0, nil
	}
	return x.AsBits(), nil
}