func (c *columnBool) Apply(r *commit.Reader) {
	for r.Next() {
		v := uint64(1) << (r.Offset & 0x3f)
		switch r.Type {
		case commit.PutTrue:
			c.data[r.Offset>>6] |= v
		case commit.PutFalse:  
			c.data[r.Offset>>6] &^= v
		}
	}
}
Apply applies a set of operations to the column.
package column
import (
	"fmt"
	"reflect"
	"sync"
	"github.com/kelindar/bitmap"
	"github.com/kelindar/column/commit"
)
type columnType uint8
const (
	typeGeneric = columnType(0)       
	typeNumeric = columnType(1 << 0)  
	typeTextual = columnType(1 << 1)  
)
func typeOf(column Column) (typ columnType) {
	if _, ok := column.(Numeric); ok {
		typ = typ | typeNumeric
	}
	if _, ok := column.(Textual); ok {
		typ = typ | typeTextual
	}
	return
}
type Column interface {
	Grow(idx uint32)
	Apply(*commit.Reader)
	Value(idx uint32) (interface{}, bool)
	Contains(idx uint32) bool
	Index() *bitmap.Bitmap
}
type Numeric interface {
	Column
	LoadFloat64(uint32) (float64, bool)
	LoadUint64(uint32) (uint64, bool)
	LoadInt64(uint32) (int64, bool)
	FilterFloat64(uint32, bitmap.Bitmap, func(v float64) bool)
	FilterUint64(uint32, bitmap.Bitmap, func(v uint64) bool)
	FilterInt64(uint32, bitmap.Bitmap, func(v int64) bool)
}
type Textual interface {
	Column
	LoadString(uint32) (string, bool)
	FilterString(uint32, bitmap.Bitmap, func(v string) bool)
}
var (
	ForString  = makeStrings
	ForFloat32 = makeFloat32s
	ForFloat64 = makeFloat64s
	ForInt     = makeInts
	ForInt16   = makeInt16s
	ForInt32   = makeInt32s
	ForInt64   = makeInt64s
	ForUint    = makeUints
	ForUint16  = makeUint16s
	ForUint32  = makeUint32s
	ForUint64  = makeUint64s
	ForBool    = makeBools
	ForEnum    = makeEnum
	ForKey     = makeKey
)
func ForKind(kind reflect.Kind) Column {
	switch kind {
	case reflect.Float32:
		return makeFloat32s()
	case reflect.Float64:
		return makeFloat64s()
	case reflect.Int:
		return makeInts()
	case reflect.Int16:
		return makeInt16s()
	case reflect.Int32:
		return makeInt32s()
	case reflect.Int64:
		return makeInt64s()
	case reflect.Uint:
		return makeUints()
	case reflect.Uint16:
		return makeUint16s()
	case reflect.Uint32:
		return makeUint32s()
	case reflect.Uint64:
		return makeUint64s()
	case reflect.Bool:
		return makeBools()
	case reflect.String:
		return makeStrings()
	default:
		panic(fmt.Errorf("column: unsupported column kind (%v)", kind))
	}
}
type column struct {
	Column
	lock sync.RWMutex  
	kind columnType    
	name string        
}
func columnFor(name string, v Column) *column {
	return &column{
		kind:   typeOf(v),
		name:   name,
		Column: v,
	}
}
func (c *column) IsNumeric() bool {
	return (c.kind & typeNumeric) == typeNumeric
}
func (c *column) IsTextual() bool {
	return (c.kind & typeTextual) == typeTextual
}
func (c *column) Grow(idx uint32) {
	c.lock.Lock()
	defer c.lock.Unlock()
	c.Column.Grow(idx)
}
func (c *column) Apply(r *commit.Reader) {
	c.lock.RLock()
	defer c.lock.RUnlock()
	r.Rewind()
	c.Column.Apply(r)
}
func (c *column) Value(idx uint32) (v interface{}, ok bool) {
	v, ok = c.Column.Value(idx)
	return
}
func (c *column) String(idx uint32) (v string, ok bool) {
	if column, text := c.Column.(Textual); text {
		v, ok = column.LoadString(idx)
	}
	return
}
func (c *column) Float64(idx uint32) (v float64, ok bool) {
	if n, contains := c.Column.(Numeric); contains {
		v, ok = n.LoadFloat64(idx)
	}
	return
}
func (c *column) Int64(idx uint32) (v int64, ok bool) {
	if n, contains := c.Column.(Numeric); contains {
		v, ok = n.LoadInt64(idx)
	}
	return
}
func (c *column) Uint64(idx uint32) (v uint64, ok bool) {
	if n, contains := c.Column.(Numeric); contains {
		v, ok = n.LoadUint64(idx)
	}
	return
}
type columnBool struct {
	data bitmap.Bitmap
}
func makeBools() Column {
	return &columnBool{
		data: make(bitmap.Bitmap, 0, 4),
	}
}
func (c *columnBool) Grow(idx uint32) {
	c.data.Grow(idx)
}